1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

typecasts to please picky compilers checking the printf() format string

This commit is contained in:
Daniel Stenberg 2004-04-06 07:48:29 +00:00
parent 0fff8656e9
commit 57c86a953d

View File

@ -77,13 +77,13 @@ static GlobCode glob_set(URLGlob *glob, char *pattern,
switch (*pattern) { switch (*pattern) {
case '\0': /* URL ended while set was still open */ case '\0': /* URL ended while set was still open */
snprintf(glob->errormsg, sizeof(glob->errormsg), snprintf(glob->errormsg, sizeof(glob->errormsg),
"unmatched brace at pos %d\n", pos); "unmatched brace at pos %d\n", (int)pos);
return GLOB_ERROR; return GLOB_ERROR;
case '{': case '{':
case '[': /* no nested expressions at this time */ case '[': /* no nested expressions at this time */
snprintf(glob->errormsg, sizeof(glob->errormsg), snprintf(glob->errormsg, sizeof(glob->errormsg),
"nested braces not supported at pos %d\n", pos); "nested braces not supported at pos %d\n", (int)pos);
return GLOB_ERROR; return GLOB_ERROR;
case ',': case ',':
@ -119,13 +119,13 @@ static GlobCode glob_set(URLGlob *glob, char *pattern,
case ']': /* illegal closing bracket */ case ']': /* illegal closing bracket */
snprintf(glob->errormsg, sizeof(glob->errormsg), snprintf(glob->errormsg, sizeof(glob->errormsg),
"illegal pattern at pos %d\n", pos); "illegal pattern at pos %d\n", (int)pos);
return GLOB_ERROR; return GLOB_ERROR;
case '\\': /* escaped character, skip '\' */ case '\\': /* escaped character, skip '\' */
if (*(buf+1) == '\0') { /* but no escaping of '\0'! */ if (*(buf+1) == '\0') { /* but no escaping of '\0'! */
snprintf(glob->errormsg, sizeof(glob->errormsg), snprintf(glob->errormsg, sizeof(glob->errormsg),
"illegal pattern at pos %d\n", pos); "illegal pattern at pos %d\n", (int)pos);
return GLOB_ERROR; return GLOB_ERROR;
} }
++pattern; ++pattern;