mirror of
https://github.com/reactos/CMake.git
synced 2024-11-25 04:29:52 +00:00
ERR: Fixed compiler warnings when using strict ansi.
This commit is contained in:
parent
589cf38a36
commit
05e162f00a
@ -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;
|
||||
|
@ -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++;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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 == '-' ||
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user