diff --git a/i3-config-wizard/main.c b/i3-config-wizard/main.c index 5d08ca21..ccd2ba9a 100644 --- a/i3-config-wizard/main.c +++ b/i3-config-wizard/main.c @@ -732,7 +732,7 @@ static void finish(void) { /* Skip leading whitespace */ char *walk = line; - while (isspace(*walk) && walk < (line + len)) { + while (isspace((unsigned char)*walk) && walk < (line + len)) { /* Pre-output the skipped whitespaces to keep proper indentation */ fputc(*walk, ks_config); walk++; diff --git a/i3bar/src/child.c b/i3bar/src/child.c index 740912f0..f6d7cf78 100644 --- a/i3bar/src/child.c +++ b/i3bar/src/child.c @@ -525,7 +525,7 @@ static void stdin_io_first_line_cb(int fd) { static bool isempty(char *s) { while (*s != '\0') { - if (!isspace(*s)) { + if (!isspace((unsigned char)*s)) { return false; } s++; diff --git a/src/util.c b/src/util.c index c0609987..228846fa 100644 --- a/src/util.c +++ b/src/util.c @@ -67,7 +67,7 @@ __attribute__((__const__)) bool rect_equals(const Rect a, const Rect b) { __attribute__((pure)) bool name_is_digits(const char *name) { /* positive integers and zero are interpreted as numbers */ for (size_t i = 0; i < strlen(name); i++) { - if (!isdigit(name[i])) { + if (!isdigit((unsigned char)name[i])) { return false; } }