diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/examples/ftp-wildcard.c | 4 | ||||
-rw-r--r-- | docs/examples/synctime.c | 9 |
2 files changed, 6 insertions, 7 deletions
diff --git a/docs/examples/ftp-wildcard.c b/docs/examples/ftp-wildcard.c index f249bc135..ee815973d 100644 --- a/docs/examples/ftp-wildcard.c +++ b/docs/examples/ftp-wildcard.c @@ -41,8 +41,6 @@ static size_t write_it(char *buff, size_t size, size_t nmemb, int main(int argc, char **argv) { - int rc = CURLE_OK; - /* curl easy handle */ CURL *handle; @@ -50,7 +48,7 @@ int main(int argc, char **argv) struct callback_data data = { 0 }; /* global initialization */ - rc = curl_global_init(CURL_GLOBAL_ALL); + int rc = curl_global_init(CURL_GLOBAL_ALL); if(rc) return rc; diff --git a/docs/examples/synctime.c b/docs/examples/synctime.c index 905f51189..0113007c8 100644 --- a/docs/examples/synctime.c +++ b/docs/examples/synctime.c @@ -137,7 +137,6 @@ size_t SyncTime_CURL_WriteOutput(void *ptr, size_t size, size_t nmemb, size_t SyncTime_CURL_WriteHeader(void *ptr, size_t size, size_t nmemb, void *stream) { - int i, RetVal; char TmpStr1[26], TmpStr2[26]; (void)stream; @@ -156,11 +155,13 @@ size_t SyncTime_CURL_WriteHeader(void *ptr, size_t size, size_t nmemb, TmpStr1 & 2? */ AutoSyncTime = 0; else { - RetVal = sscanf((char *)(ptr), "Date: %s %hu %s %hu %hu:%hu:%hu", - TmpStr1, &SYSTime.wDay, TmpStr2, &SYSTime.wYear, - &SYSTime.wHour, &SYSTime.wMinute, &SYSTime.wSecond); + int RetVal = sscanf((char *)(ptr), "Date: %s %hu %s %hu %hu:%hu:%hu", + TmpStr1, &SYSTime.wDay, TmpStr2, &SYSTime.wYear, + &SYSTime.wHour, &SYSTime.wMinute, + &SYSTime.wSecond); if(RetVal == 7) { + int i; SYSTime.wMilliseconds = 500; /* adjust to midpoint, 0.5 sec */ for(i = 0; i<12; i++) { if(strcmp(MthStr[i], TmpStr2) == 0) { |