mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-31 06:15:15 +00:00
Fix a build warning in set_degstr. The prototype of iconv() is
stupid but won't change so we have to live with it. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5801 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
@@ -125,15 +125,16 @@ static void set_degstr(void)
|
||||
/* Size hardcoded for better performance.
|
||||
Don't forget to count the trailing \0! */
|
||||
size_t deg_latin1_size = 3;
|
||||
char *deg_latin1_text[2] = { "\260C", "\260F" };
|
||||
char deg_latin1_text[2][3] = { "\260C", "\260F" };
|
||||
char *deg_latin1_ptr = deg_latin1_text[fahrenheit];
|
||||
size_t nconv;
|
||||
size_t degstr_size = sizeof(degstr);
|
||||
char *degstr_ptr = degstr;
|
||||
|
||||
iconv_t cd = iconv_open(nl_langinfo(CODESET), "ISO-8859-1");
|
||||
if (cd != (iconv_t) -1) {
|
||||
nconv = iconv(cd, &(deg_latin1_text[fahrenheit]),
|
||||
°_latin1_size, °str_ptr, °str_size);
|
||||
nconv = iconv(cd, °_latin1_ptr, °_latin1_size,
|
||||
°str_ptr, °str_size);
|
||||
iconv_close(cd);
|
||||
|
||||
if (nconv != (size_t) -1)
|
||||
|
Reference in New Issue
Block a user