diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 6 | ||||
-rw-r--r-- | src/urlglob.c | 18 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/main.c b/src/main.c index 467fe0807..e9f9d30a2 100644 --- a/src/main.c +++ b/src/main.c @@ -3480,8 +3480,8 @@ int my_trace(CURL *handle, curl_infotype type, secs = tv.tv_sec; now = localtime(&secs); /* not multithread safe but we don't care */ if(config->tracetime) - snprintf(timebuf, sizeof(timebuf), "%02d:%02d:%02d.%06d ", - now->tm_hour, now->tm_min, now->tm_sec, tv.tv_usec); + snprintf(timebuf, sizeof(timebuf), "%02d:%02d:%02d.%06ld ", + now->tm_hour, now->tm_min, now->tm_sec, (long)tv.tv_usec); else timebuf[0]=0; @@ -4927,7 +4927,7 @@ show_error: } #else if((res!=CURLE_OK) && config->showerror) { - fprintf(config->errors, "curl: (%d) %s\n", (int)res, + fprintf(config->errors, "curl: (%d) %s\n", res, errorbuffer[0]? errorbuffer: curl_easy_strerror((CURLcode)res)); if(CURLE_SSL_CACERT == res) { diff --git a/src/urlglob.c b/src/urlglob.c index 73b02c6bd..e2fc37775 100644 --- a/src/urlglob.c +++ b/src/urlglob.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -79,13 +79,13 @@ static GlobCode glob_set(URLGlob *glob, char *pattern, switch (*pattern) { case '\0': /* URL ended while set was still open */ snprintf(glob->errormsg, sizeof(glob->errormsg), - "unmatched brace at pos %d\n", (int)pos); + "unmatched brace at pos %zu\n", pos); return GLOB_ERROR; case '{': case '[': /* no nested expressions at this time */ snprintf(glob->errormsg, sizeof(glob->errormsg), - "nested braces not supported at pos %d\n", (int)pos); + "nested braces not supported at pos %zu\n", pos); return GLOB_ERROR; case ',': @@ -122,7 +122,7 @@ static GlobCode glob_set(URLGlob *glob, char *pattern, case ']': /* illegal closing bracket */ snprintf(glob->errormsg, sizeof(glob->errormsg), - "illegal pattern at pos %d\n", (int)pos); + "illegal pattern at pos %zu\n", pos); return GLOB_ERROR; case '\\': /* escaped character, skip '\' */ @@ -141,7 +141,7 @@ static GlobCode glob_set(URLGlob *glob, char *pattern, if(skip) { if (*(buf+1) == '\0') { /* but no escaping of '\0'! */ snprintf(glob->errormsg, sizeof(glob->errormsg), - "illegal pattern at pos %d\n", (int)pos); + "illegal pattern at pos %zu\n", pos); return GLOB_ERROR; } ++pattern; @@ -186,14 +186,14 @@ static GlobCode glob_range(URLGlob *glob, char *pattern, if ((rc < 3) || (min_c >= max_c) || ((max_c - min_c) > ('z' - 'a'))) { /* the pattern is not well-formed */ snprintf(glob->errormsg, sizeof(glob->errormsg), - "error: bad range specification after pos %d\n", pos); + "error: bad range specification after pos %zu\n", pos); return GLOB_ERROR; } /* check the (first) separating character */ if((sep != ']') && (sep != ':')) { snprintf(glob->errormsg, sizeof(glob->errormsg), - "error: unsupported character (%c) after range at pos %d\n", + "error: unsupported character (%c) after range at pos %zu\n", sep, pos); return GLOB_ERROR; } @@ -217,7 +217,7 @@ static GlobCode glob_range(URLGlob *glob, char *pattern, if ((rc < 2) || (min_n > max_n)) { /* the pattern is not well-formed */ snprintf(glob->errormsg, sizeof(glob->errormsg), - "error: bad range specification after pos %d\n", pos); + "error: bad range specification after pos %zu\n", pos); return GLOB_ERROR; } pat->content.NumRange.ptr_n = pat->content.NumRange.min_n = min_n; @@ -239,7 +239,7 @@ static GlobCode glob_range(URLGlob *glob, char *pattern, } else { snprintf(glob->errormsg, sizeof(glob->errormsg), - "illegal character in range specification at pos %d\n", pos); + "illegal character in range specification at pos %zu\n", pos); return GLOB_ERROR; } |