From 399a6f09ff051988e2e840185ad1f7f5b8a2adce Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Sun, 18 Jun 2017 14:07:37 +0200 Subject: Fix warnings: tolower() and similar require uchar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit utils.c: In function 'osmo_str2lower': utils.c:277:3: warning: array subscript has type 'char' [-Wchar-subscripts] out[i] = tolower(in[i]); And according to man: If c is neither an unsigned char value nor EOF, the behavior of these func‐ tions is undefined. Change-Id: I3fed2ab6a4efba9f8a21fcf84a5b3a91e8df084f --- src/gsm/gsm_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gsm') diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c index 5a4ceb36..61d3f833 100644 --- a/src/gsm/gsm_utils.c +++ b/src/gsm/gsm_utils.c @@ -596,7 +596,7 @@ const char *gsm_band_name(enum gsm_band band) /*! Parse string name of a GSM band */ enum gsm_band gsm_band_parse(const char* mhz) { - while (*mhz && !isdigit(*mhz)) + while (*mhz && !isdigit((unsigned char)*mhz)) mhz++; if (*mhz == '\0') -- cgit v1.2.3