diff --git a/epan/dfilter/dfilter-macro.c b/epan/dfilter/dfilter-macro.c index 6d9799b17b..9098d65162 100644 --- a/epan/dfilter/dfilter-macro.c +++ b/epan/dfilter/dfilter-macro.c @@ -221,7 +221,7 @@ gchar* dfilter_macro_apply(const gchar* text, guint depth, const gchar** error) } break; } case NAME: { - if ( isalnum((int)c) || c == '_' ) { + if ( isalnum((guchar)c) || c == '_' ) { g_string_append_c(name,c); } else if ( c == ':') { state = ARGS; @@ -452,7 +452,7 @@ static gboolean macro_name_chk(void* r _U_, const char* in_name, unsigned name_l guint i; for (i=0; i < name_len; i++) { - if (!(in_name[i] == '_' || isalnum((int)in_name[i]) ) ) { + if (!(in_name[i] == '_' || isalnum((guchar)in_name[i]) ) ) { *error = "invalid char in name"; return FALSE; } diff --git a/epan/strutil.c b/epan/strutil.c index b7ab4d1d13..3f1b04db86 100644 --- a/epan/strutil.c +++ b/epan/strutil.c @@ -553,15 +553,15 @@ hex_str_to_bytes(const char *hex_str, GByteArray *bytes, gboolean force_separato gboolean uri_str_to_bytes(const char *uri_str, GByteArray *bytes) { guint8 val; - const char *p; - char hex_digit[HEX_DIGIT_BUF_LEN]; + const guchar *p; + guchar hex_digit[HEX_DIGIT_BUF_LEN]; g_byte_array_set_size(bytes, 0); if (! uri_str) { return FALSE; } - p = uri_str; + p = (const guchar *)uri_str; while (*p) { if (! isascii(*p) || ! isprint(*p)) @@ -574,9 +574,9 @@ uri_str_to_bytes(const char *uri_str, GByteArray *bytes) { if (*p == '\0') return FALSE; hex_digit[1] = *p; hex_digit[2] = '\0'; - if (! isxdigit((int)hex_digit[0]) || ! isxdigit((int)hex_digit[1])) + if (! isxdigit(hex_digit[0]) || ! isxdigit(hex_digit[1])) return FALSE; - val = (guint8) strtoul(hex_digit, NULL, 16); + val = (guint8) strtoul((char *)hex_digit, NULL, 16); g_byte_array_append(bytes, &val, 1); } else { g_byte_array_append(bytes, (guint8 *) p, 1); @@ -691,7 +691,7 @@ oid_str_to_bytes(const char *oid_str, GByteArray *bytes) { p = oid_str; dot = NULL; while (*p) { - if (!isdigit((int)*p) && (*p != '.')) return FALSE; + if (!isdigit((guchar)*p) && (*p != '.')) return FALSE; if (*p == '.') { if (p == oid_str) return FALSE; if (!*(p+1)) return FALSE; @@ -707,7 +707,7 @@ oid_str_to_bytes(const char *oid_str, GByteArray *bytes) { subid0 = 0; /* squelch GCC complaints */ while (*p) { subid = 0; - while (isdigit((int)*p)) { + while (isdigit((guchar)*p)) { subid *= 10; subid += *p - '0'; p++; diff --git a/epan/uat.c b/epan/uat.c index cd180f329d..44ec7a53c3 100644 --- a/epan/uat.c +++ b/epan/uat.c @@ -186,7 +186,7 @@ static void putfld(FILE* fp, void* rec, uat_field_t* f) { for(i=0;i