From eb0b6412af16fe00ce38faa31bd50c238f4e7098 Mon Sep 17 00:00:00 2001 From: Tommie Gannert Date: Sun, 14 Aug 2016 12:35:52 +0100 Subject: Fix warnings about using a char array index on NetBSD. The isspace macro is just a table lookup. --- src/print_battery_info.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/print_battery_info.c') diff --git a/src/print_battery_info.c b/src/print_battery_info.c index 3e97528..a97bdea 100644 --- a/src/print_battery_info.c +++ b/src/print_battery_info.c @@ -404,14 +404,14 @@ void print_battery_info(yajl_gen json_gen, char *buffer, int number, const char } } -#define EAT_SPACE_FROM_OUTPUT_IF_NO_OUTPUT() \ - do { \ - if (outwalk == prevoutwalk) { \ - if (outwalk > buffer && isspace(outwalk[-1])) \ - outwalk--; \ - else if (isspace(*(walk + 1))) \ - walk++; \ - } \ +#define EAT_SPACE_FROM_OUTPUT_IF_NO_OUTPUT() \ + do { \ + if (outwalk == prevoutwalk) { \ + if (outwalk > buffer && isspace((int)outwalk[-1])) \ + outwalk--; \ + else if (isspace((int)*(walk + 1))) \ + walk++; \ + } \ } while (0) for (walk = format; *walk != '\0'; walk++) { -- cgit v1.2.3