diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2017-06-18 14:07:37 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2017-06-23 10:21:54 +0200 |
commit | 399a6f09ff051988e2e840185ad1f7f5b8a2adce (patch) | |
tree | 52e2ef27a1576b71c74c358bcfc5c0554df21ea0 /src/gsm | |
parent | 4573502a1c0c84949d7195a9ea3ee8996bb29c0f (diff) |
Fix warnings: tolower() and similar require uchar
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
Diffstat (limited to 'src/gsm')
-rw-r--r-- | src/gsm/gsm_utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
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') |