diff options
author | Brad King <brad.king@kitware.com> | 2002-06-18 21:19:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2002-06-18 21:19:38 (GMT) |
commit | 05e162f00ad198d65aa83be1e5ea1d07b0838563 (patch) | |
tree | a5b0b10eab44225cca65e0449cadc69eec75fbae /Source/CursesDialog/form | |
parent | 589cf38a365bd6453d93be27ee2b824cf9e6c7d6 (diff) | |
download | CMake-05e162f00ad198d65aa83be1e5ea1d07b0838563.zip CMake-05e162f00ad198d65aa83be1e5ea1d07b0838563.tar.gz CMake-05e162f00ad198d65aa83be1e5ea1d07b0838563.tar.bz2 |
ERR: Fixed compiler warnings when using strict ansi.
Diffstat (limited to 'Source/CursesDialog/form')
-rw-r--r-- | Source/CursesDialog/form/frm_driver.c | 2 | ||||
-rw-r--r-- | Source/CursesDialog/form/frm_req_name.c | 2 | ||||
-rw-r--r-- | Source/CursesDialog/form/fty_alnum.c | 1 | ||||
-rw-r--r-- | Source/CursesDialog/form/fty_int.c | 1 | ||||
-rw-r--r-- | Source/CursesDialog/form/fty_ipv4.c | 7 | ||||
-rw-r--r-- | Source/CursesDialog/form/fty_num.c | 1 | ||||
-rw-r--r-- | Source/CursesDialog/form/fty_regex.c | 7 |
7 files changed, 17 insertions, 4 deletions
diff --git a/Source/CursesDialog/form/frm_driver.c b/Source/CursesDialog/form/frm_driver.c index 596371b..d48bcd2 100644 --- a/Source/CursesDialog/form/frm_driver.c +++ b/Source/CursesDialog/form/frm_driver.c @@ -3797,7 +3797,7 @@ int set_field_buffer(FIELD * field, int buffer, const char * value) unsigned int i; for(i=len; i<vlen; i++) - if (!isprint(value[i])) + if (!isprint((int)(value[i]))) RETURN(E_BAD_ARGUMENT); } len = vlen; diff --git a/Source/CursesDialog/form/frm_req_name.c b/Source/CursesDialog/form/frm_req_name.c index 0c0755b..b108dab 100644 --- a/Source/CursesDialog/form/frm_req_name.c +++ b/Source/CursesDialog/form/frm_req_name.c @@ -153,7 +153,7 @@ int form_request_by_name( const char *str ) strncpy(buf,str,sizeof(buf)); while( (i<sizeof(buf)) && (buf[i] != '\0') ) { - buf[i] = toupper(buf[i]); + buf[i] = toupper((int)(buf[i])); i++; } diff --git a/Source/CursesDialog/form/fty_alnum.c b/Source/CursesDialog/form/fty_alnum.c index 0642899..6f3cfd4 100644 --- a/Source/CursesDialog/form/fty_alnum.c +++ b/Source/CursesDialog/form/fty_alnum.c @@ -115,6 +115,7 @@ static bool Check_AlphaNumeric_Field(FIELD * field, const void * argp) +--------------------------------------------------------------------------*/ static bool Check_AlphaNumeric_Character(int c, const void * argp) { + argp=0; /* Silence unused parameter warning. */ return (isalnum(c) ? TRUE : FALSE); } diff --git a/Source/CursesDialog/form/fty_int.c b/Source/CursesDialog/form/fty_int.c index 2f14ca2..7107fcc 100644 --- a/Source/CursesDialog/form/fty_int.c +++ b/Source/CursesDialog/form/fty_int.c @@ -138,6 +138,7 @@ static bool Check_Integer_Field(FIELD * field, const void * argp) +--------------------------------------------------------------------------*/ static bool Check_Integer_Character(int c, const void * argp) { + argp=0; /* Silence unused parameter warning. */ return ((isdigit(c) || (c=='-')) ? TRUE : FALSE); } diff --git a/Source/CursesDialog/form/fty_ipv4.c b/Source/CursesDialog/form/fty_ipv4.c index d7f2296..4ac8a50 100644 --- a/Source/CursesDialog/form/fty_ipv4.c +++ b/Source/CursesDialog/form/fty_ipv4.c @@ -32,13 +32,15 @@ static bool Check_IPV4_Field(FIELD * field, const void * argp) int num = 0, len; unsigned int d1, d2, d3, d4; - if(isdigit(*bp)) /* Must start with digit */ + argp=0; /* Silence unused parameter warning. */ + + if(isdigit((int)(*bp))) /* Must start with digit */ { num = sscanf(bp, "%u.%u.%u.%u%n", &d1, &d2, &d3, &d4, &len); if (num == 4) { bp += len; /* Make bp point to what sscanf() left */ - while (*bp && isspace(*bp)) + while (*bp && isspace((int)(*bp))) bp++; /* Allow trailing whitespace */ } } @@ -59,6 +61,7 @@ static bool Check_IPV4_Field(FIELD * field, const void * argp) +--------------------------------------------------------------------------*/ static bool Check_IPV4_Character(int c, const void * argp) { + argp=0; /* Silence unused parameter warning. */ return ((isdigit(c) || (c=='.')) ? TRUE : FALSE); } diff --git a/Source/CursesDialog/form/fty_num.c b/Source/CursesDialog/form/fty_num.c index 4ba69e1..7809599 100644 --- a/Source/CursesDialog/form/fty_num.c +++ b/Source/CursesDialog/form/fty_num.c @@ -161,6 +161,7 @@ static bool Check_Numeric_Field(FIELD * field, const void * argp) +--------------------------------------------------------------------------*/ static bool Check_Numeric_Character(int c, const void * argp) { + argp=0; /* Silence unused parameter warning. */ return (isdigit(c) || c == '+' || c == '-' || diff --git a/Source/CursesDialog/form/fty_regex.c b/Source/CursesDialog/form/fty_regex.c index ec02157..0af1cef 100644 --- a/Source/CursesDialog/form/fty_regex.c +++ b/Source/CursesDialog/form/fty_regex.c @@ -147,6 +147,7 @@ static void *Make_RegularExpression_Type(va_list * ap) } return (void *)pArg; #else + ap=0; /* Silence unused parameter warning. */ return 0; #endif } @@ -173,6 +174,7 @@ static void *Copy_RegularExpression_Type(const void * argp) } return (void *)result; #else + argp=0; /* Silence unused parameter warning. */ return 0; #endif } @@ -209,6 +211,8 @@ static void Free_RegularExpression_Type(void * argp) free(ap); } } +#else + argp=0; /* Silence unused parameter warning. */ #endif } @@ -234,6 +238,9 @@ static bool Check_RegularExpression_Field(FIELD * field, const void * argp) RegExp_Arg *ap = (RegExp_Arg *)argp; if (ap && ap->compiled_expression) match = (step(field_buffer(field,0),ap->compiled_expression) ? TRUE:FALSE); +#else + argp=0; /* Silence unused parameter warning. */ + field=0; /* Silence unused parameter warning. */ #endif return match; } |