diff options
-rw-r--r-- | cpukit/ChangeLog | 12 | ||||
-rw-r--r-- | cpukit/ftpd/ftpd.c | 16 | ||||
-rw-r--r-- | cpukit/httpd/uemf.c | 8 | ||||
-rw-r--r-- | cpukit/httpd/um.c | 4 | ||||
-rw-r--r-- | cpukit/httpd/webs.c | 9 | ||||
-rw-r--r-- | cpukit/httpd/websuemf.c | 2 | ||||
-rw-r--r-- | cpukit/libblock/src/diskdevs.c | 1 | ||||
-rw-r--r-- | cpukit/libmisc/capture/capture-cli.c | 4 | ||||
-rw-r--r-- | cpukit/libmisc/monitor/mon-network.c | 2 | ||||
-rw-r--r-- | cpukit/libmisc/shell/hexdump-odsyntax.c | 8 | ||||
-rw-r--r-- | cpukit/libmisc/shell/main_ifconfig.c | 2 | ||||
-rw-r--r-- | cpukit/libmisc/uuid/parse.c | 2 | ||||
-rw-r--r-- | cpukit/libnetworking/lib/ftpfs.c | 6 | ||||
-rw-r--r-- | cpukit/libnetworking/libc/gethostbyht.c | 8 | ||||
-rw-r--r-- | cpukit/libnetworking/libc/getnetnamadr.c | 2 | ||||
-rw-r--r-- | cpukit/libnetworking/libc/inet_network.c | 8 | ||||
-rw-r--r-- | cpukit/libnetworking/rtems/rtems_mii_ioctl.c | 4 | ||||
-rw-r--r-- | cpukit/score/src/objectgetnameasstring.c | 2 |
18 files changed, 56 insertions, 44 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 712efb8358..bb09f11c35 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,5 +1,17 @@ 2010-03-11 Joel Sherrill <joel.sherrill@oarcorp.com> + * ftpd/ftpd.c, httpd/uemf.c, httpd/um.c, httpd/webs.c, + httpd/websuemf.c, libblock/src/diskdevs.c, + libmisc/capture/capture-cli.c, libmisc/monitor/mon-network.c, + libmisc/shell/hexdump-odsyntax.c, libmisc/shell/main_ifconfig.c, + libmisc/uuid/parse.c, libnetworking/lib/ftpfs.c, + libnetworking/libc/gethostbyht.c, libnetworking/libc/getnetnamadr.c, + libnetworking/libc/inet_network.c, + libnetworking/rtems/rtems_mii_ioctl.c, + score/src/objectgetnameasstring.c: Fix warnings for ctype methods. + +2010-03-11 Joel Sherrill <joel.sherrill@oarcorp.com> + * libmisc/shell/shell_makeargs.c: Fix warnings. 2010-03-11 Joel Sherrill <joel.sherrill@oarcorp.com> diff --git a/cpukit/ftpd/ftpd.c b/cpukit/ftpd/ftpd.c index 569f8aab44..92f2946c94 100644 --- a/cpukit/ftpd/ftpd.c +++ b/cpukit/ftpd/ftpd.c @@ -1568,18 +1568,18 @@ skip_options(char **p) char* buf = *p; char* last = NULL; while(1) { - while(isspace(*buf)) + while(isspace((int)*buf)) ++buf; if(*buf == '-') { if(*++buf == '-') { /* `--' should terminate options */ - if(isspace(*++buf)) { + if(isspace((int)*++buf)) { last = buf; do ++buf; - while(isspace(*buf)); + while(isspace((int)*buf)); break; } } - while(*buf && !isspace(*buf)) + while(*buf && !isspace((int)*buf)) ++buf; last = buf; } @@ -1612,18 +1612,18 @@ split_command(char *buf, char **cmd, char **opts, char **args) { char* eoc; char* p = buf; - while(isspace(*p)) + while(isspace((int)*p)) ++p; *cmd = p; - while(*p && !isspace(*p)) + while(*p && !isspace((int)*p)) { - *p = toupper(*p); + *p = toupper((int)*p); ++p; } eoc = p; if(*p) *p++ = '\0'; - while(isspace(*p)) + while(isspace((int)*p)) ++p; *opts = p; skip_options(&p); diff --git a/cpukit/httpd/uemf.c b/cpukit/httpd/uemf.c index d2d1eefe31..862a1451de 100644 --- a/cpukit/httpd/uemf.c +++ b/cpukit/httpd/uemf.c @@ -168,7 +168,7 @@ int emfInstGet(void) char_t *strlower(char_t *string) { - char_t *s; + unsigned char *s; a_assert(string); @@ -176,7 +176,7 @@ char_t *strlower(char_t *string) return NULL; } - s = string; + s = (unsigned char *)string; while (*s) { if (gisupper(*s)) { *s = (char_t) gtolower(*s); @@ -194,14 +194,14 @@ char_t *strlower(char_t *string) char_t *strupper(char_t *string) { - char_t *s; + unsigned char *s; a_assert(string); if (string == NULL) { return NULL; } - s = string; + s = (unsigned char *)string; while (*s) { if (gislower(*s)) { *s = (char_t) gtoupper(*s); diff --git a/cpukit/httpd/um.c b/cpukit/httpd/um.c index 5c59cfd25c..b2ea6671db 100644 --- a/cpukit/httpd/um.c +++ b/cpukit/httpd/um.c @@ -255,7 +255,7 @@ int umRestore(char_t *filename) static int umEncryptString(char_t *textString) { char_t *enMask; - char_t enChar; + unsigned char enChar; int numChars; a_assert(textString); @@ -1419,7 +1419,7 @@ static bool_t umCheckName(char_t *name) if (name && *name) { while (*name) { - if (gisspace(*name)) { + if (gisspace((int)*name)) { return FALSE; } diff --git a/cpukit/httpd/webs.c b/cpukit/httpd/webs.c index 5c22606782..8fe5a6aa65 100644 --- a/cpukit/httpd/webs.c +++ b/cpukit/httpd/webs.c @@ -861,7 +861,7 @@ static void websParseRequest(webs_t wp) value = T(""); } - while (gisspace(*value)) { + while (gisspace((int)*value)) { value++; } strlower(key); @@ -897,7 +897,7 @@ static void websParseRequest(webs_t wp) * Truncate authType at the next non-alpha character */ cp = authType; - while (gisalpha(*cp)) { + while (gisalpha((int)*cp)) { cp++; } *cp = '\0'; @@ -1667,14 +1667,15 @@ int websWriteDataNonBlock(webs_t wp, char *buf, int nChars) void websDecodeUrl(char_t *decoded, char_t *token, int len) { - char_t *ip, *op; + unsigned char *ip; + char_t *op; int num, i, c; a_assert(decoded); a_assert(token); op = decoded; - for (ip = token; *ip && len > 0; ip++, op++) { + for (ip = (unsigned char *)token; *ip && len > 0; ip++, op++) { if (*ip == '+') { *op = ' '; } else if (*ip == '%' && gisxdigit(ip[1]) && gisxdigit(ip[2])) { diff --git a/cpukit/httpd/websuemf.c b/cpukit/httpd/websuemf.c index 262956ee5f..267ada8c2f 100644 --- a/cpukit/httpd/websuemf.c +++ b/cpukit/httpd/websuemf.c @@ -84,7 +84,7 @@ int strcmpci(char_t *s1, char_t *s2) } do { - rc = gtolower(*s1) - gtolower(*s2); + rc = gtolower((int)*s1) - gtolower((int)*s2); if (*s1 == '\0') { break; } diff --git a/cpukit/libblock/src/diskdevs.c b/cpukit/libblock/src/diskdevs.c index 1873b35549..bf2d03f003 100644 --- a/cpukit/libblock/src/diskdevs.c +++ b/cpukit/libblock/src/diskdevs.c @@ -170,7 +170,6 @@ create_disk_table_entry(dev_t dev) static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { - rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; diff --git a/cpukit/libmisc/capture/capture-cli.c b/cpukit/libmisc/capture/capture-cli.c index fb9dc45e84..7f8e37c66e 100644 --- a/cpukit/libmisc/capture/capture-cli.c +++ b/cpukit/libmisc/capture/capture-cli.c @@ -642,7 +642,7 @@ rtems_capture_cli_get_name_id (char* arg, l = strlen (arg); for (i = 0; i < l; i++) - if (!isxdigit (arg[i])) + if (!isxdigit ((int)arg[i])) break; if (i == l) @@ -1324,7 +1324,7 @@ rtems_capture_cli_trace_records (int argc, l = strlen (argv[arg]); for (i = 0; i < l; i++) - if (!isdigit (argv[arg][i])) + if (!isdigit ((int)argv[arg][i])) { fprintf (stdout, "error: not a number\n"); return; diff --git a/cpukit/libmisc/monitor/mon-network.c b/cpukit/libmisc/monitor/mon-network.c index 2e3404b8a4..f311b0de09 100644 --- a/cpukit/libmisc/monitor/mon-network.c +++ b/cpukit/libmisc/monitor/mon-network.c @@ -70,7 +70,7 @@ void mon_ifconfig(int argc, char *argv[], cur_idx += 1; } else { iface = argv[1]; - if (isdigit(*argv[2])) { + if (isdigit((int)*argv[2])) { if (inet_pton(AF_INET, argv[2], &ipaddr.sin_addr) < 0) { printf("bad ip address: %s\n", argv[2]); return; diff --git a/cpukit/libmisc/shell/hexdump-odsyntax.c b/cpukit/libmisc/shell/hexdump-odsyntax.c index e95441f789..3924a680af 100644 --- a/cpukit/libmisc/shell/hexdump-odsyntax.c +++ b/cpukit/libmisc/shell/hexdump-odsyntax.c @@ -219,7 +219,7 @@ odoffset(rtems_shell_hexdump_globals* globals, int argc, char ***argvp) p = argc == 1 ? (*argvp)[0] : (*argvp)[1]; if (*p != '+' && (argc < 2 || - (!isdigit(p[0]) && (p[0] != 'x' || !isxdigit(p[1]))))) + (!isdigit((int)p[0]) && (p[0] != 'x' || !isxdigit((int)p[1]))))) return; base = 0; @@ -229,7 +229,7 @@ odoffset(rtems_shell_hexdump_globals* globals, int argc, char ***argvp) */ if (p[0] == '+') ++p; - if (p[0] == 'x' && isxdigit(p[1])) { + if (p[0] == 'x' && isxdigit((int)p[1])) { ++p; base = 16; } else if (p[0] == '0' && p[1] == 'x') { @@ -239,9 +239,9 @@ odoffset(rtems_shell_hexdump_globals* globals, int argc, char ***argvp) /* skip over the number */ if (base == 16) - for (num = p; isxdigit(*p); ++p); + for (num = p; isxdigit((int)*p); ++p); else - for (num = p; isdigit(*p); ++p); + for (num = p; isdigit((int)*p); ++p); /* check for no number */ if (num == p) diff --git a/cpukit/libmisc/shell/main_ifconfig.c b/cpukit/libmisc/shell/main_ifconfig.c index 5326710918..b314dc9b9c 100644 --- a/cpukit/libmisc/shell/main_ifconfig.c +++ b/cpukit/libmisc/shell/main_ifconfig.c @@ -73,7 +73,7 @@ int rtems_shell_main_ifconfig( cur_idx += 1; } else { iface = argv[1]; - if (isdigit(*argv[2])) { + if (isdigit((int)*argv[2])) { if (inet_pton(AF_INET, argv[2], &ipaddr.sin_addr) < 0) { printf("bad ip address: %s\n", argv[2]); return 0; diff --git a/cpukit/libmisc/uuid/parse.c b/cpukit/libmisc/uuid/parse.c index beedefca81..aa003dec32 100644 --- a/cpukit/libmisc/uuid/parse.c +++ b/cpukit/libmisc/uuid/parse.c @@ -61,7 +61,7 @@ int uuid_parse(const char *in, uuid_t uu) if (i== 36) if (*cp == 0) continue; - if (!isxdigit(*cp)) + if (!isxdigit((int)*cp)) return -1; } uuid.time_low = strtoul(in, NULL, 16); diff --git a/cpukit/libnetworking/lib/ftpfs.c b/cpukit/libnetworking/lib/ftpfs.c index baf5821b1b..4b47d8df23 100644 --- a/cpukit/libnetworking/lib/ftpfs.c +++ b/cpukit/libnetworking/lib/ftpfs.c @@ -277,8 +277,8 @@ static rtems_ftpfs_reply rtems_ftpfs_get_reply( ) { rtems_ftpfs_reply_state state = RTEMS_FTPFS_REPLY_START; - char reply_first [RTEMS_FTPFS_REPLY_SIZE] = { 'a', 'a', 'a' }; - char reply_last [RTEMS_FTPFS_REPLY_SIZE] = { 'b', 'b', 'b' }; + unsigned char reply_first [RTEMS_FTPFS_REPLY_SIZE] = { 'a', 'a', 'a' }; + unsigned char reply_last [RTEMS_FTPFS_REPLY_SIZE] = { 'b', 'b', 'b' }; size_t reply_first_index = 0; size_t reply_last_index = 0; char buf [128]; @@ -856,7 +856,7 @@ static void rtems_ftpfs_pasv_parser( size_t i = 0; for (i = 0; i < len; ++i) { - char c = buf [i]; + int c = buf [i]; switch (e->state) { case RTEMS_FTPFS_PASV_START: diff --git a/cpukit/libnetworking/libc/gethostbyht.c b/cpukit/libnetworking/libc/gethostbyht.c index 65979b7f8a..e20414ca45 100644 --- a/cpukit/libnetworking/libc/gethostbyht.c +++ b/cpukit/libnetworking/libc/gethostbyht.c @@ -252,7 +252,7 @@ again: if (*cur=='#' || *cur=='\n') goto parseerror; /* first, the ip number */ pe->h_name=cur; - while (cur<last && !isspace(*cur)) cur++; + while (cur<last && !isspace((int)*cur)) cur++; if (cur>=last) return 0; if (*cur=='\n') goto parseerror; { @@ -278,9 +278,9 @@ again: ++cur; /* now the aliases */ for (aliasidx=0;aliasidx<9;++aliasidx) { - while (cur<last && isblank(*cur)) ++cur; + while (cur<last && isblank((int)*cur)) ++cur; pe->h_aliases[aliasidx]=cur; - while (cur<last && !isspace(*cur)) ++cur; + while (cur<last && !isspace((int)*cur)) ++cur; { char *from=pe->h_aliases[aliasidx]; int len=cur-from; @@ -291,7 +291,7 @@ again: *dest=0; ++dest; } if (*cur=='\n') { ++cur; ++aliasidx; break; } - if (cur>=last || !isblank(*cur)) break; + if (cur>=last || !isblank((int)*cur)) break; cur++; } pe->h_aliases[aliasidx]=0; diff --git a/cpukit/libnetworking/libc/getnetnamadr.c b/cpukit/libnetworking/libc/getnetnamadr.c index e3abcbbaf5..0ce9341f1f 100644 --- a/cpukit/libnetworking/libc/getnetnamadr.c +++ b/cpukit/libnetworking/libc/getnetnamadr.c @@ -101,7 +101,7 @@ init_services(void) if (cp == NULL) continue; do { - if (isalpha(cp[0])) { + if (isalpha((int)cp[0])) { service_order[cc] = get_service_name(cp); if(service_order[cc] != SERVICE_NONE) cc++; diff --git a/cpukit/libnetworking/libc/inet_network.c b/cpukit/libnetworking/libc/inet_network.c index 8cd2761ce4..1efbf19ca3 100644 --- a/cpukit/libnetworking/libc/inet_network.c +++ b/cpukit/libnetworking/libc/inet_network.c @@ -62,13 +62,13 @@ again: if (*cp == 'x' || *cp == 'X') base = 16, cp++; while ((c = *cp) != 0) { - if (isdigit(c)) { + if (isdigit((int)c)) { val = (val * base) + (c - '0'); cp++; continue; } - if (base == 16 && isxdigit(c)) { - val = (val << 4) + (c + 10 - (islower(c) ? 'a' : 'A')); + if (base == 16 && isxdigit((int)c)) { + val = (val << 4) + (c + 10 - (islower((int)c) ? 'a' : 'A')); cp++; continue; } @@ -80,7 +80,7 @@ again: *pp++ = val, cp++; goto again; } - if (*cp && !isspace(*cp)) + if (*cp && !isspace((int)*cp)) return (INADDR_NONE); *pp++ = val; n = pp - parts; diff --git a/cpukit/libnetworking/rtems/rtems_mii_ioctl.c b/cpukit/libnetworking/rtems/rtems_mii_ioctl.c index 6501fc0ae9..b2b8b4d35f 100644 --- a/cpukit/libnetworking/rtems/rtems_mii_ioctl.c +++ b/cpukit/libnetworking/rtems/rtems_mii_ioctl.c @@ -158,9 +158,9 @@ rtems_str2ifmedia (const char *str, int phy) return 0; if (!strncmp (chpt, "ase", 3)) chpt += 3; - if (toupper (*chpt++) != 'T') + if (toupper ((int)*chpt++) != 'T') return 0; - if (IFM_100_TX == sub && toupper (*chpt++) != 'X') + if (IFM_100_TX == sub && toupper ((int)*chpt++) != 'X') return 0; } } diff --git a/cpukit/score/src/objectgetnameasstring.c b/cpukit/score/src/objectgetnameasstring.c index ecf772cad5..a764b74296 100644 --- a/cpukit/score/src/objectgetnameasstring.c +++ b/cpukit/score/src/objectgetnameasstring.c @@ -84,7 +84,7 @@ char *_Objects_Get_name_as_string( d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { - *d = (isprint(*s)) ? *s : '*'; + *d = (isprint((int)*s)) ? *s : '*'; } } *d = '\0'; |