From: batt Date: Sun, 3 Apr 2011 13:08:59 +0000 (+0000) Subject: Fix warnings on new compilers. X-Git-Tag: 2.7.0~136 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=0233b21c389ee36a8b39381c324b6ed61b6a7a83;p=bertos.git Fix warnings on new compilers. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4830 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/mware/ini_reader.c b/bertos/mware/ini_reader.c index d16c41a3..b49198bb 100644 --- a/bertos/mware/ini_reader.c +++ b/bertos/mware/ini_reader.c @@ -79,10 +79,10 @@ static int findSection(KFile *fd, const char *section, size_t section_len, char static char *getKey(const char *line, char *key, size_t size) { /* null-terminated string */ - while (isspace(*line)) + while (isspace((unsigned char)*line)) ++line; int i = 0; - while (*line != '=' && !isspace(*line) && size) + while (*line != '=' && !isspace((unsigned char)*line) && size) { key[i++] = *line; ++line; @@ -99,7 +99,7 @@ static char *getValue(const char *line, char *value, size_t size) { while (*line++ != '=') ; - while (isspace(*line)) + while (isspace((unsigned char)*line)) ++line; int i = 0; while (*line && size) diff --git a/bertos/net/nmea.c b/bertos/net/nmea.c index d232c73a..f7487952 100644 --- a/bertos/net/nmea.c +++ b/bertos/net/nmea.c @@ -84,7 +84,7 @@ static uint32_t tokenToInt(const char *s, int precision) for(i = 0; i < NMEAP_MAX_SENTENCE_LENGTH; i++) { - char c = *s++; + unsigned char c = *s++; if (c == '.') { @@ -413,7 +413,7 @@ int nmea_gpvtg(nmeap_context_t *context, nmeap_sentence_t *sentence) */ if (sentence->callout != 0) (*sentence->callout)(context, vtg, context->user_data); - + return NMEA_GPVTG; }