From 79f2903788de2c24c134e7abad345b8a5702195d Mon Sep 17 00:00:00 2001 From: Eric Date: Fri, 19 Nov 2021 12:58:39 +0100 Subject: [PATCH] fix isdigit taking unsigned as input gcc complains because our char might or might not be signed depending on arch and phase of the moon: error: array subscript has type 'char' [-Werror=charsubscripts] Change-Id: I7c76f9a2318c4f0e5eedeea00ec380824b86567e --- src/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.c b/src/utils.c index 626dcb484..300204aea 100644 --- a/src/utils.c +++ b/src/utils.c @@ -1250,7 +1250,7 @@ int osmo_float_str_to_int(int64_t *val, const char *str, unsigned int precision) if (point) return -EINVAL; point = p; - } else if (!isdigit(*p)) + } else if (!isdigit((unsigned char)*p)) return -EINVAL; }