Fix some Solaris buildbot warnings

svn path=/trunk/; revision=21423
This commit is contained in:
Stephen Fisher 2007-04-13 23:32:21 +00:00
parent d9e06450f4
commit fa57c8fc44
4 changed files with 8 additions and 8 deletions

View File

@ -219,7 +219,7 @@ gchar* dfilter_macro_apply(const gchar* text, guint depth, gchar** error) {
}
break;
} case NAME: {
if ( isalnum(c) || c == '_' ) {
if ( isalnum((int)c) || c == '_' ) {
g_string_append_c(name,c);
} else if ( c == ':') {
state = ARGS;
@ -449,7 +449,7 @@ gboolean macro_name_chk(void* r _U_, const char* in_name, unsigned name_len, voi
guint i;
for (i=0; i < name_len; i++) {
if (!(in_name[i] == '_' || isalnum(in_name[i]) ) ) {
if (!(in_name[i] == '_' || isalnum((int)in_name[i]) ) ) {
*error = "invalid char in name";
return FALSE;
}

View File

@ -574,7 +574,7 @@ 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(hex_digit[0]) || ! isxdigit(hex_digit[1]))
if (! isxdigit((int)hex_digit[0]) || ! isxdigit((int)hex_digit[1]))
return FALSE;
val = (guint8) strtoul(hex_digit, NULL, 16);
g_byte_array_append(bytes, &val, 1);
@ -691,7 +691,7 @@ oid_str_to_bytes(const char *oid_str, GByteArray *bytes) {
p = oid_str;
dot = NULL;
while (*p) {
if (!isdigit(*p) && (*p != '.')) return FALSE;
if (!isdigit((int)*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(*p)) {
while (isdigit((int)*p)) {
subid *= 10;
subid += *p - '0';
p++;

View File

@ -186,7 +186,7 @@ static void putfld(FILE* fp, void* rec, uat_field_t* f) {
for(i=0;i<fld_len;i++) {
char c = fld_ptr[i];
if (c == '"' || c == '\\' || ! isprint(c) ) {
if (c == '"' || c == '\\' || ! isprint((int)c) ) {
fprintf(fp,"\\x%.2x",c);
} else {
putc(c,fp);
@ -513,7 +513,7 @@ char* uat_unesc(const char* si, guint in_len, guint* len_p) {
char c1 = *(s+1);
char c0 = *(s+2);
if (isxdigit(c1) && isxdigit(c0)) {
if (isxdigit((int)c1) && isxdigit((int)c0)) {
*(p++) = (xton(c1) * 0x10) + xton(c0);
s += 2;
} else {

View File

@ -285,7 +285,7 @@ CHK_STR_IS_DECL(isxdigit);
gboolean uat_fld_chk_str_ ## what (void* u1 _U_, const char* strptr, unsigned len, void* u2 _U_, void* u3 _U_, char** err) { \
guint i; for (i=0;i<len;i++) { \
char c = strptr[i]; \
if (! what(c)) { \
if (! what((int)c)) { \
*err = ep_strdup_printf("invalid char pos=%d value=%.2x",i,c); return FALSE; } } \
*err = NULL; return TRUE; }