diff --git a/docs/examples/certinfo.c b/docs/examples/certinfo.c index ceb0ac2b0..2e331a415 100644 --- a/docs/examples/certinfo.c +++ b/docs/examples/certinfo.c @@ -9,9 +9,12 @@ static size_t wrfu(void *ptr, size_t size, size_t nmemb, void *stream) { + (void)stream; + (void)ptr; return size * nmemb; } -int main(int argc, char **argv) + +int main(void) { CURL *curl; CURLcode res; diff --git a/docs/examples/debug.c b/docs/examples/debug.c index cc6848178..1e04acb51 100644 --- a/docs/examples/debug.c +++ b/docs/examples/debug.c @@ -28,12 +28,12 @@ void dump(const char *text, /* without the hex output, we can fit more on screen */ width = 0x40; - fprintf(stream, "%s, %010.10ld bytes (0x%08.8lx)\n", + fprintf(stream, "%s, %10.10ld bytes (0x%8.8lx)\n", text, (long)size, (long)size); for(i=0; i0)) printf("filesize %s: %0.0f bytes\n", filename, filesize); } else { /* we failed */ diff --git a/docs/examples/ftpgetresp.c b/docs/examples/ftpgetresp.c index 2122c4f68..c78832f3c 100644 --- a/docs/examples/ftpgetresp.c +++ b/docs/examples/ftpgetresp.c @@ -27,7 +27,7 @@ write_response(void *ptr, size_t size, size_t nmemb, void *data) return fwrite(ptr, size, nmemb, writehere); } -int main(int argc, char **argv) +int main(void) { CURL *curl; CURLcode res; diff --git a/docs/examples/ftpupload.c b/docs/examples/ftpupload.c index f1f66c0a1..bee62494c 100644 --- a/docs/examples/ftpupload.c +++ b/docs/examples/ftpupload.c @@ -48,7 +48,7 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream) return retcode; } -int main(int argc, char **argv) +int main(void) { CURL *curl; CURLcode res; diff --git a/docs/examples/getinmemory.c b/docs/examples/getinmemory.c index 635a936ba..85b049483 100644 --- a/docs/examples/getinmemory.c +++ b/docs/examples/getinmemory.c @@ -43,7 +43,7 @@ WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data) } -int main(int argc, char **argv) +int main(void) { CURL *curl_handle; @@ -87,7 +87,7 @@ int main(int argc, char **argv) * you're done with it, you should free() it as a nice application. */ - printf("%lu bytes retrieved\n", chunk.size); + printf("%lu bytes retrieved\n", (long)chunk.size); if(chunk.memory) free(chunk.memory); diff --git a/docs/examples/multi-app.c b/docs/examples/multi-app.c index 6ba131830..29b07aba1 100644 --- a/docs/examples/multi-app.c +++ b/docs/examples/multi-app.c @@ -27,7 +27,7 @@ #define HTTP_HANDLE 0 /* Index for the HTTP transfer */ #define FTP_HANDLE 1 /* Index for the FTP transfer */ -int main(int argc, char **argv) +int main(void) { CURL *handles[HANDLECOUNT]; CURLM *multi_handle; diff --git a/docs/examples/multi-debugcallback.c b/docs/examples/multi-debugcallback.c index 529c3d9bb..773faec67 100644 --- a/docs/examples/multi-debugcallback.c +++ b/docs/examples/multi-debugcallback.c @@ -37,12 +37,12 @@ void dump(const char *text, /* without the hex output, we can fit more on screen */ width = 0x40; - fprintf(stream, "%s, %010.10ld bytes (0x%08.8lx)\n", + fprintf(stream, "%s, %10.10ld bytes (0x%8.8lx)\n", text, (long)size, (long)size); for(i=0; i -int main(int argc, char *argv[]) +int main(void) { CURL *curl; diff --git a/docs/examples/multi-single.c b/docs/examples/multi-single.c index f248afe76..ca632e08c 100644 --- a/docs/examples/multi-single.c +++ b/docs/examples/multi-single.c @@ -22,7 +22,7 @@ /* * Simply download a HTTP file. */ -int main(int argc, char **argv) +int main(void) { CURL *http_handle; CURLM *multi_handle; diff --git a/docs/examples/persistant.c b/docs/examples/persistant.c index 177ada359..53710cde4 100644 --- a/docs/examples/persistant.c +++ b/docs/examples/persistant.c @@ -11,7 +11,7 @@ #include #include -int main(int argc, char **argv) +int main(void) { CURL *curl; CURLcode res; diff --git a/docs/examples/sepheaders.c b/docs/examples/sepheaders.c index e0c4cbbb7..3fb9045e1 100644 --- a/docs/examples/sepheaders.c +++ b/docs/examples/sepheaders.c @@ -21,7 +21,7 @@ static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream) return written; } -int main(int argc, char **argv) +int main(void) { CURL *curl_handle; static const char *headerfilename = "head.out"; diff --git a/docs/examples/simplessl.c b/docs/examples/simplessl.c index db3accaaa..a02c2ae32 100644 --- a/docs/examples/simplessl.c +++ b/docs/examples/simplessl.c @@ -32,7 +32,7 @@ */ -int main(int argc, char **argv) +int main(void) { CURL *curl; CURLcode res; @@ -47,7 +47,7 @@ int main(int argc, char **argv) const char *pEngine; -#if USE_ENGINE +#ifdef USE_ENGINE pKeyName = "rsa_test"; pKeyType = "ENG"; pEngine = "chil"; /* for nChiper HSM... */