Fix warnings about using a char array index on NetBSD.
The isspace macro is just a table lookup.
This commit is contained in:
parent
a937693cef
commit
eb0b6412af
@ -407,9 +407,9 @@ void print_battery_info(yajl_gen json_gen, char *buffer, int number, const char
|
|||||||
#define EAT_SPACE_FROM_OUTPUT_IF_NO_OUTPUT() \
|
#define EAT_SPACE_FROM_OUTPUT_IF_NO_OUTPUT() \
|
||||||
do { \
|
do { \
|
||||||
if (outwalk == prevoutwalk) { \
|
if (outwalk == prevoutwalk) { \
|
||||||
if (outwalk > buffer && isspace(outwalk[-1])) \
|
if (outwalk > buffer && isspace((int)outwalk[-1])) \
|
||||||
outwalk--; \
|
outwalk--; \
|
||||||
else if (isspace(*(walk + 1))) \
|
else if (isspace((int)*(walk + 1))) \
|
||||||
walk++; \
|
walk++; \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
Loading…
Reference in New Issue
Block a user