[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] branch master updated: Silenced compiler wa
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] branch master updated: Silenced compiler warnings in src/testcurl. |
Date: |
Mon, 30 Oct 2017 19:36:54 +0100 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
The following commit(s) were added to refs/heads/master by this push:
new 8da22ca0 Silenced compiler warnings in src/testcurl.
8da22ca0 is described below
commit 8da22ca0612e633aa76f145b879d83833dbdcdfe
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Mon Oct 30 21:36:27 2017 +0300
Silenced compiler warnings in src/testcurl.
---
src/testcurl/perf_get.c | 3 +++
src/testcurl/perf_get_concurrent.c | 4 ++++
src/testcurl/test_callback.c | 6 ++++++
src/testcurl/test_concurrent_stop.c | 6 +++++-
src/testcurl/test_delete.c | 2 ++
src/testcurl/test_digestauth.c | 14 ++++++++++----
src/testcurl/test_digestauth_with_arguments.c | 14 ++++++++++----
src/testcurl/test_get.c | 5 +++++
src/testcurl/test_get_chunked.c | 3 +++
src/testcurl/test_get_response_cleanup.c | 2 ++
src/testcurl/test_get_sendfile.c | 3 +++
src/testcurl/test_iplimit.c | 2 ++
src/testcurl/test_large_put.c | 1 +
src/testcurl/test_long_header.c | 5 +++++
src/testcurl/test_parse_cookies.c | 2 ++
src/testcurl/test_post.c | 7 +++++++
src/testcurl/test_post_loop.c | 5 ++++-
src/testcurl/test_postform.c | 5 +++++
src/testcurl/test_process_arguments.c | 2 ++
src/testcurl/test_process_headers.c | 2 ++
src/testcurl/test_put.c | 2 ++
src/testcurl/test_put_chunked.c | 2 ++
src/testcurl/test_quiesce.c | 3 +++
src/testcurl/test_quiesce_stream.c | 5 +++++
src/testcurl/test_termination.c | 6 +++++-
src/testcurl/test_timeout.c | 10 +++++++---
src/testcurl/test_urlparse.c | 3 +++
27 files changed, 110 insertions(+), 14 deletions(-)
diff --git a/src/testcurl/perf_get.c b/src/testcurl/perf_get.c
index d7ddc0e2..98578173 100644
--- a/src/testcurl/perf_get.c
+++ b/src/testcurl/perf_get.c
@@ -161,6 +161,8 @@ ahc_echo (void *cls,
static int ptr;
const char *me = cls;
int ret;
+ (void)url;(void)version; /* Unused. Silent compiler
warning. */
+ (void)upload_data;(void)upload_data_size; /* Unused. Silent compiler
warning. */
if (0 != strcmp (me, method))
return MHD_NO; /* unexpected method */
@@ -561,6 +563,7 @@ main (int argc, char *const *argv)
{
unsigned int errorCount = 0;
int port = 1130;
+ (void)argc; /* Unused. Silent compiler warning. */
oneone = (NULL != strrchr (argv[0], (int) '/')) ?
(NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
diff --git a/src/testcurl/perf_get_concurrent.c
b/src/testcurl/perf_get_concurrent.c
index d234b720..49ed1ba4 100644
--- a/src/testcurl/perf_get_concurrent.c
+++ b/src/testcurl/perf_get_concurrent.c
@@ -134,6 +134,7 @@ copyBuffer (void *ptr,
size_t size, size_t nmemb,
void *ctx)
{
+ (void)ptr;(void)ctx; /* Unused. Silent compiler warning. */
return size * nmemb;
}
@@ -150,6 +151,8 @@ ahc_echo (void *cls,
static int ptr;
const char *me = cls;
int ret;
+ (void)url;(void)version; /* Unused. Silent compiler
warning. */
+ (void)upload_data;(void)upload_data_size; /* Unused. Silent compiler
warning. */
if (0 != strcmp (me, method))
return MHD_NO; /* unexpected method */
@@ -455,6 +458,7 @@ main (int argc, char *const *argv)
{
unsigned int errorCount = 0;
int port = 1100;
+ (void)argc; /* Unused. Silent compiler warning. */
oneone = (NULL != strrchr (argv[0], (int) '/')) ?
(NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
diff --git a/src/testcurl/test_callback.c b/src/testcurl/test_callback.c
index b7dc9fe8..5b9daf0f 100644
--- a/src/testcurl/test_callback.c
+++ b/src/testcurl/test_callback.c
@@ -38,6 +38,7 @@ static ssize_t
called_twice(void *cls, uint64_t pos, char *buf, size_t max)
{
struct callback_closure *cls2 = cls;
+ (void)pos; /* Unused. Silent compiler warning. */
if (cls2->called == 0)
{
@@ -70,6 +71,9 @@ callback(void *cls,
struct callback_closure *cbc = calloc(1, sizeof(struct callback_closure));
struct MHD_Response *r;
int ret;
+ (void)cls;(void)url; /* Unused. Silent compiler
warning. */
+ (void)method;(void)version;(void)upload_data; /* Unused. Silent compiler
warning. */
+ (void)upload_data_size;(void)con_cls; /* Unused. Silent compiler
warning. */
r = MHD_create_response_from_callback (MHD_SIZE_UNKNOWN, 1024,
&called_twice, cbc,
@@ -93,6 +97,7 @@ discard_buffer (void *ptr,
size_t nmemb,
void *ctx)
{
+ (void)ptr;(void)ctx; /* Unused. Silent compiler warning. */
return size * nmemb;
}
@@ -118,6 +123,7 @@ main(int argc, char **argv)
struct timeval tv;
int extra;
int port;
+ (void)argc; (void)argv; /* Unused. Silent compiler warning. */
if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT))
port = 0;
diff --git a/src/testcurl/test_concurrent_stop.c
b/src/testcurl/test_concurrent_stop.c
index 8fe09a44..3409d472 100644
--- a/src/testcurl/test_concurrent_stop.c
+++ b/src/testcurl/test_concurrent_stop.c
@@ -66,6 +66,7 @@ copyBuffer (void *ptr,
size_t size, size_t nmemb,
void *ctx)
{
+ (void)ptr;(void)ctx; /* Unused. Silent compiler warning. */
return size * nmemb;
}
@@ -83,6 +84,8 @@ ahc_echo (void *cls,
static int ptr;
const char *me = cls;
int ret;
+ (void)url;(void)version; /* Unused. Silent compiler
warning. */
+ (void)upload_data;(void)upload_data_size; /* Unused. Silent compiler
warning. */
if (0 != strcmp (me, method))
return MHD_NO; /* unexpected method */
@@ -269,12 +272,13 @@ main (int argc, char *const *argv)
{
unsigned int errorCount = 0;
int port;
+ (void)argc; /* Unused. Silent compiler warning. */
+
if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT))
port = 0;
else
port = 1142;
-
oneone = (NULL != strrchr (argv[0], (int) '/')) ?
(NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
if (0 != port && oneone)
diff --git a/src/testcurl/test_delete.c b/src/testcurl/test_delete.c
index 1b4b8db0..55a53288 100644
--- a/src/testcurl/test_delete.c
+++ b/src/testcurl/test_delete.c
@@ -90,6 +90,7 @@ ahc_echo (void *cls,
int *done = cls;
struct MHD_Response *response;
int ret;
+ (void)version;(void)unused; /* Unused. Silent compiler warning. */
if (0 != strcasecmp ("DELETE", method))
return MHD_NO; /* unexpected method */
@@ -505,6 +506,7 @@ int
main (int argc, char *const *argv)
{
unsigned int errorCount = 0;
+ (void)argc; /* Unused. Silent compiler warning. */
oneone = (NULL != strrchr (argv[0], (int) '/')) ?
(NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
diff --git a/src/testcurl/test_digestauth.c b/src/testcurl/test_digestauth.c
index e22156db..e107da2a 100644
--- a/src/testcurl/test_digestauth.c
+++ b/src/testcurl/test_digestauth.c
@@ -84,6 +84,9 @@ ahc_echo (void *cls,
const char *password = "testpass";
const char *realm = "address@hidden";
int ret;
+ (void)cls;(void)url; /* Unused. Silent compiler
warning. */
+ (void)method;(void)version;(void)upload_data; /* Unused. Silent compiler
warning. */
+ (void)upload_data_size;(void)unused; /* Unused. Silent compiler
warning. */
username = MHD_digest_auth_get_username (connection);
if ( (username == NULL) ||
@@ -133,17 +136,19 @@ ahc_echo (void *cls,
static int
testDigestAuth ()
{
- int fd;
CURL *c;
CURLcode errornum;
struct MHD_Daemon *d;
struct CBC cbc;
- size_t len;
- size_t off = 0;
char buf[2048];
char rnd[8];
int port;
char url[128];
+#ifndef WINDOWS
+ int fd;
+ size_t len;
+ size_t off = 0;
+#endif /* ! WINDOWS */
if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT))
port = 0;
@@ -187,7 +192,7 @@ testDigestAuth ()
GetLastError ());
return 1;
}
- b = CryptGenRandom (cc, 8, rnd);
+ b = CryptGenRandom (cc, 8, (BYTE*)rnd);
if (b == 0)
{
fprintf (stderr, "Failed to generate 8 random bytes: %lu\n",
@@ -251,6 +256,7 @@ int
main (int argc, char *const *argv)
{
unsigned int errorCount = 0;
+ (void)argc; (void)argv; /* Unused. Silent compiler warning. */
#ifdef MHD_HTTPS_REQUIRE_GRYPT
#ifdef HAVE_GCRYPT_H
diff --git a/src/testcurl/test_digestauth_with_arguments.c
b/src/testcurl/test_digestauth_with_arguments.c
index 45228fa3..72578376 100644
--- a/src/testcurl/test_digestauth_with_arguments.c
+++ b/src/testcurl/test_digestauth_with_arguments.c
@@ -82,6 +82,9 @@ ahc_echo (void *cls,
const char *password = "testpass";
const char *realm = "address@hidden";
int ret;
+ (void)cls;(void)url; /* Unused. Silent compiler
warning. */
+ (void)method;(void)version;(void)upload_data; /* Unused. Silent compiler
warning. */
+ (void)upload_data_size;(void)unused; /* Unused. Silent compiler
warning. */
username = MHD_digest_auth_get_username(connection);
if ( (username == NULL) ||
@@ -128,17 +131,19 @@ ahc_echo (void *cls,
static int
testDigestAuth ()
{
- int fd;
CURL *c;
CURLcode errornum;
struct MHD_Daemon *d;
struct CBC cbc;
- size_t len;
- size_t off = 0;
char buf[2048];
char rnd[8];
int port;
char url[128];
+#ifndef WINDOWS
+ int fd;
+ size_t len;
+ size_t off = 0;
+#endif /* ! WINDOWS */
if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT))
port = 0;
@@ -182,7 +187,7 @@ testDigestAuth ()
GetLastError ());
return 1;
}
- b = CryptGenRandom (cc, 8, rnd);
+ b = CryptGenRandom (cc, 8, (BYTE*)rnd);
if (b == 0)
{
fprintf (stderr, "Failed to generate 8 random bytes: %lu\n",
@@ -246,6 +251,7 @@ int
main (int argc, char *const *argv)
{
unsigned int errorCount = 0;
+ (void)argc; (void)argv; /* Unused. Silent compiler warning. */
#ifdef MHD_HTTPS_REQUIRE_GRYPT
#ifdef HAVE_GCRYPT_H
diff --git a/src/testcurl/test_get.c b/src/testcurl/test_get.c
index 2b4089e1..b16c1554 100644
--- a/src/testcurl/test_get.c
+++ b/src/testcurl/test_get.c
@@ -88,6 +88,7 @@ ahc_echo (void *cls,
const char *me = cls;
struct MHD_Response *response;
int ret;
+ (void)version;(void)upload_data;(void)upload_data_size; /* Unused.
Silent compiler warning. */
if (0 != strcasecmp (me, method))
return MHD_NO; /* unexpected method */
@@ -633,6 +634,8 @@ ahc_empty (void *cls,
static int ptr;
struct MHD_Response *response;
int ret;
+ (void)cls;(void)url;(void)url;(void)version; /* Unused. Silent compiler
warning. */
+ (void)upload_data;(void)upload_data_size; /* Unused. Silent compiler
warning. */
if (0 != strcasecmp ("GET", method))
return MHD_NO; /* unexpected method */
@@ -658,6 +661,7 @@ curlExcessFound(CURL *c, curl_infotype type, char *data,
size_t size, void *cls)
{
static const char *excess_found = "Excess found";
const size_t str_size = strlen (excess_found);
+ (void)c; /* Unused. Silent compiler warning. */
if (CURLINFO_TEXT == type
&& size >= str_size
@@ -744,6 +748,7 @@ int
main (int argc, char *const *argv)
{
unsigned int errorCount = 0;
+ (void)argc; /* Unused. Silent compiler warning. */
oneone = (NULL != strrchr (argv[0], (int) '/')) ?
(NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
diff --git a/src/testcurl/test_get_chunked.c b/src/testcurl/test_get_chunked.c
index f698907c..46730fd4 100644
--- a/src/testcurl/test_get_chunked.c
+++ b/src/testcurl/test_get_chunked.c
@@ -119,6 +119,8 @@ ahc_echo (void *cls,
struct MHD_Response *response;
struct MHD_Response **responseptr;
int ret;
+ (void)url;(void)version; /* Unused. Silent compiler
warning. */
+ (void)upload_data;(void)upload_data_size; /* Unused. Silent compiler
warning. */
if (0 != strcmp (me, method))
return MHD_NO; /* unexpected method */
@@ -497,6 +499,7 @@ int
main (int argc, char *const *argv)
{
unsigned int errorCount = 0;
+ (void)argc; (void)argv; /* Unused. Silent compiler warning. */
if (0 != curl_global_init (CURL_GLOBAL_WIN32))
return 2;
diff --git a/src/testcurl/test_get_response_cleanup.c
b/src/testcurl/test_get_response_cleanup.c
index cb93ad69..d2ab119d 100644
--- a/src/testcurl/test_get_response_cleanup.c
+++ b/src/testcurl/test_get_response_cleanup.c
@@ -386,6 +386,8 @@ int
main (int argc, char *const *argv)
{
unsigned int errorCount = 0;
+ (void)argc; /* Unused. Silent compiler warning. */
+
#ifndef _WIN32
/* Solaris has no way to disable SIGPIPE on socket disconnect. */
if (MHD_NO == MHD_is_feature_supported (MHD_FEATURE_AUTOSUPPRESS_SIGPIPE))
diff --git a/src/testcurl/test_get_sendfile.c b/src/testcurl/test_get_sendfile.c
index de51e1d0..6718106d 100644
--- a/src/testcurl/test_get_sendfile.c
+++ b/src/testcurl/test_get_sendfile.c
@@ -87,6 +87,8 @@ ahc_echo (void *cls,
struct MHD_Response *response;
int ret;
int fd;
+ (void)url;(void)version; /* Unused. Silent compiler
warning. */
+ (void)upload_data;(void)upload_data_size; /* Unused. Silent compiler
warning. */
if (0 != strcmp (me, method))
return MHD_NO; /* unexpected method */
@@ -572,6 +574,7 @@ main (int argc, char *const *argv)
unsigned int errorCount = 0;
const char *tmp;
FILE *f;
+ (void)argc; /* Unused. Silent compiler warning. */
if ( (NULL == (tmp = getenv ("TMPDIR"))) &&
(NULL == (tmp = getenv ("TMP"))) &&
diff --git a/src/testcurl/test_iplimit.c b/src/testcurl/test_iplimit.c
index 110a09e6..392b2915 100644
--- a/src/testcurl/test_iplimit.c
+++ b/src/testcurl/test_iplimit.c
@@ -85,6 +85,7 @@ ahc_echo (void *cls,
const char *me = cls;
struct MHD_Response *response;
int ret;
+ (void)version;(void)upload_data;(void)upload_data_size; /* Unused.
Silent compiler warning. */
if (0 != strcmp (me, method))
return MHD_NO; /* unexpected method */
@@ -336,6 +337,7 @@ int
main (int argc, char *const *argv)
{
unsigned int errorCount = 0;
+ (void)argc; /* Unused. Silent compiler warning. */
oneone = (NULL != strrchr (argv[0], (int) '/')) ?
(NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
diff --git a/src/testcurl/test_large_put.c b/src/testcurl/test_large_put.c
index 4dc16319..a801856f 100644
--- a/src/testcurl/test_large_put.c
+++ b/src/testcurl/test_large_put.c
@@ -127,6 +127,7 @@ ahc_echo (void *cls,
struct MHD_Response *response;
int ret;
static size_t processed;
+ (void)version; /* Unused. Silent compiler warning. */
if (0 != strcmp ("PUT", method))
return MHD_NO; /* unexpected method */
diff --git a/src/testcurl/test_long_header.c b/src/testcurl/test_long_header.c
index 31a8581d..49b183dc 100644
--- a/src/testcurl/test_long_header.c
+++ b/src/testcurl/test_long_header.c
@@ -48,6 +48,7 @@ static int oneone;
static int
apc_all (void *cls, const struct sockaddr *addr, socklen_t addrlen)
{
+ (void)cls;(void)addr;(void)addrlen; /* Unused. Silent compiler warning. */
return MHD_YES;
}
@@ -61,6 +62,7 @@ struct CBC
static size_t
copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx)
{
+ (void)ptr;(void)ctx; /* Unused. Silent compiler warning. */
return size * nmemb;
}
@@ -76,6 +78,8 @@ ahc_echo (void *cls,
const char *me = cls;
struct MHD_Response *response;
int ret;
+ (void)version;(void)upload_data; /* Unused. Silent compiler warning. */
+ (void)upload_data_size;(void)unused; /* Unused. Silent compiler warning. */
if (0 != strcmp (me, method))
return MHD_NO; /* unexpected method */
@@ -276,6 +280,7 @@ int
main (int argc, char *const *argv)
{
unsigned int errorCount = 0;
+ (void)argc; /* Unused. Silent compiler warning. */
oneone = (NULL != strrchr (argv[0], (int) '/')) ?
(NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
diff --git a/src/testcurl/test_parse_cookies.c
b/src/testcurl/test_parse_cookies.c
index a406bd32..3e2c181e 100644
--- a/src/testcurl/test_parse_cookies.c
+++ b/src/testcurl/test_parse_cookies.c
@@ -72,6 +72,7 @@ ahc_echo (void *cls,
struct MHD_Response *response;
int ret;
const char *hdr;
+ (void)version;(void)upload_data;(void)upload_data_size; /* Unused.
Silent compiler warning. */
if (0 != strcmp (me, method))
return MHD_NO; /* unexpected method */
@@ -271,6 +272,7 @@ int
main (int argc, char *const *argv)
{
unsigned int errorCount = 0;
+ (void)argc; /* Unused. Silent compiler warning. */
oneone = (NULL != strrchr (argv[0], (int) '/')) ?
(NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
diff --git a/src/testcurl/test_post.c b/src/testcurl/test_post.c
index 5d01405a..6af7b38a 100644
--- a/src/testcurl/test_post.c
+++ b/src/testcurl/test_post.c
@@ -69,6 +69,7 @@ completed_cb (void *cls,
enum MHD_RequestTerminationCode toe)
{
struct MHD_PostProcessor *pp = *con_cls;
+ (void)cls;(void)connection;(void)toe; /* Unused. Silent compiler warning. */
if (NULL != pp)
MHD_destroy_post_processor (pp);
@@ -104,6 +105,8 @@ post_iterator (void *cls,
const char *value, uint64_t off, size_t size)
{
int *eok = cls;
+ (void)kind;(void)filename;(void)content_type; /* Unused. Silent compiler
warning. */
+ (void)transfer_encoding;(void)off; /* Unused. Silent compiler
warning. */
if ((0 == strcasecmp (key, "name")) &&
(size == strlen ("daniel")) && (0 == strncmp (value, "daniel", size)))
@@ -128,6 +131,7 @@ ahc_echo (void *cls,
struct MHD_Response *response;
struct MHD_PostProcessor *pp;
int ret;
+ (void)cls;(void)version; /* Unused. Silent compiler warning. */
if (0 != strcasecmp ("POST", method))
{
@@ -551,6 +555,8 @@ ahc_cancel (void *cls,
{
struct MHD_Response *response;
int ret;
+ (void)cls;(void)url;(void)version; /* Unused. Silent compiler
warning. */
+ (void)upload_data;(void)upload_data_size; /* Unused. Silent compiler
warning. */
if (0 != strcasecmp ("POST", method))
{
@@ -762,6 +768,7 @@ int
main (int argc, char *const *argv)
{
unsigned int errorCount = 0;
+ (void)argc; /* Unused. Silent compiler warning. */
oneone = (NULL != strrchr (argv[0], (int) '/')) ?
(NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
diff --git a/src/testcurl/test_post_loop.c b/src/testcurl/test_post_loop.c
index 9a4c6db1..880d3389 100644
--- a/src/testcurl/test_post_loop.c
+++ b/src/testcurl/test_post_loop.c
@@ -81,6 +81,8 @@ ahc_echo (void *cls,
static int marker;
struct MHD_Response *response;
int ret;
+ (void)cls;(void)url;(void)version; /* Unused. Silent compiler
warning. */
+ (void)upload_data;(void)upload_data_size; /* Unused. Silent compiler
warning. */
if (0 != strcmp ("POST", method))
{
@@ -475,7 +477,7 @@ testExternalPost ()
if (MHD_NO == MHD_get_timeout (d, &timeout))
timeout = 100; /* 100ms == INFTY -- CURL bug... */
if ((CURLM_OK == curl_multi_timeout (multi, &ctimeout)) &&
- (ctimeout < timeout) && (ctimeout >= 0))
+ (ctimeout < (long long)timeout) && (ctimeout >= 0))
timeout = ctimeout;
if ( (c == NULL) || (running == 0) )
timeout = 0; /* terminate quickly... */
@@ -557,6 +559,7 @@ int
main (int argc, char *const *argv)
{
unsigned int errorCount = 0;
+ (void)argc; /* Unused. Silent compiler warning. */
oneone = (NULL != strrchr (argv[0], (int) '/')) ?
(NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
diff --git a/src/testcurl/test_postform.c b/src/testcurl/test_postform.c
index cbb46413..f0a77b8d 100644
--- a/src/testcurl/test_postform.c
+++ b/src/testcurl/test_postform.c
@@ -65,6 +65,7 @@ completed_cb (void *cls,
enum MHD_RequestTerminationCode toe)
{
struct MHD_PostProcessor *pp = *con_cls;
+ (void)cls;(void)connection;(void)toe; /* Unused. Silent compiler
warning. */
if (NULL != pp)
MHD_destroy_post_processor (pp);
@@ -100,6 +101,8 @@ post_iterator (void *cls,
const char *value, uint64_t off, size_t size)
{
int *eok = cls;
+ (void)kind;(void)filename;(void)content_type; /* Unused. Silent compiler
warning. */
+ (void)transfer_encoding;(void)off; /* Unused. Silent compiler
warning. */
#if 0
fprintf (stderr, "PI sees %s-%.*s\n", key, size, value);
@@ -127,6 +130,7 @@ ahc_echo (void *cls,
struct MHD_Response *response;
struct MHD_PostProcessor *pp;
int ret;
+ (void)cls;(void)version; /* Unused. Silent compiler warning. */
if (0 != strcmp ("POST", method))
{
@@ -571,6 +575,7 @@ int
main (int argc, char *const *argv)
{
unsigned int errorCount = 0;
+ (void)argc; /* Unused. Silent compiler warning. */
#ifdef MHD_HTTPS_REQUIRE_GRYPT
#ifdef HAVE_GCRYPT_H
diff --git a/src/testcurl/test_process_arguments.c
b/src/testcurl/test_process_arguments.c
index 32200229..4f29574d 100644
--- a/src/testcurl/test_process_arguments.c
+++ b/src/testcurl/test_process_arguments.c
@@ -73,6 +73,7 @@ ahc_echo (void *cls,
struct MHD_Response *response;
int ret;
const char *hdr;
+ (void)version;(void)upload_data;(void)upload_data_size; /* Unused.
Silent compiler warning. */
if (0 != strcmp (me, method))
return MHD_NO; /* unexpected method */
@@ -271,6 +272,7 @@ int
main (int argc, char *const *argv)
{
unsigned int errorCount = 0;
+ (void)argc; /* Unused. Silent compiler warning. */
oneone = (NULL != strrchr (argv[0], (int) '/')) ?
(NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
diff --git a/src/testcurl/test_process_headers.c
b/src/testcurl/test_process_headers.c
index 50d40839..d123c441 100644
--- a/src/testcurl/test_process_headers.c
+++ b/src/testcurl/test_process_headers.c
@@ -91,6 +91,7 @@ ahc_echo (void *cls,
struct MHD_Response *response;
int ret;
const char *hdr;
+ (void)version;(void)upload_data;(void)upload_data_size; /* Unused.
Silent compiler warning. */
if (0 != strcmp (me, method))
return MHD_NO; /* unexpected method */
@@ -515,6 +516,7 @@ int
main (int argc, char *const *argv)
{
unsigned int errorCount = 0;
+ (void)argc; /* Unused. Silent compiler warning. */
oneone = (NULL != strrchr (argv[0], (int) '/')) ?
(NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
diff --git a/src/testcurl/test_put.c b/src/testcurl/test_put.c
index 11768be8..8f4198f5 100644
--- a/src/testcurl/test_put.c
+++ b/src/testcurl/test_put.c
@@ -90,6 +90,7 @@ ahc_echo (void *cls,
int *done = cls;
struct MHD_Response *response;
int ret;
+ (void)version;(void)unused; /* Unused. Silent compiler warning. */
if (0 != strcasecmp ("PUT", method))
return MHD_NO; /* unexpected method */
@@ -516,6 +517,7 @@ int
main (int argc, char *const *argv)
{
unsigned int errorCount = 0;
+ (void)argc; /* Unused. Silent compiler warning. */
oneone = (NULL != strrchr (argv[0], (int) '/')) ?
(NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
diff --git a/src/testcurl/test_put_chunked.c b/src/testcurl/test_put_chunked.c
index f4c60aab..5e9acbba 100644
--- a/src/testcurl/test_put_chunked.c
+++ b/src/testcurl/test_put_chunked.c
@@ -92,6 +92,7 @@ ahc_echo (void *cls,
struct MHD_Response *response;
int ret;
int have;
+ (void)version;(void)unused; /* Unused. Silent compiler warning. */
if (0 != strcmp ("PUT", method))
return MHD_NO; /* unexpected method */
@@ -511,6 +512,7 @@ int
main (int argc, char *const *argv)
{
unsigned int errorCount = 0;
+ (void)argc; (void)argv; /* Unused. Silent compiler warning. */
if (0 != curl_global_init (CURL_GLOBAL_WIN32))
return 2;
diff --git a/src/testcurl/test_quiesce.c b/src/testcurl/test_quiesce.c
index 0063606f..f9fd9690 100644
--- a/src/testcurl/test_quiesce.c
+++ b/src/testcurl/test_quiesce.c
@@ -83,6 +83,7 @@ ahc_echo (void *cls,
const char *me = cls;
struct MHD_Response *response;
int ret;
+ (void)version;(void)upload_data;(void)upload_data_size; /* Unused.
Silent compiler warning. */
if (0 != strcmp (me, method))
return MHD_NO; /* unexpected method */
@@ -107,6 +108,7 @@ static void
request_completed (void *cls, struct MHD_Connection *connection,
void **con_cls, enum MHD_RequestTerminationCode code)
{
+ (void)connection;(void)con_cls;(void)code; /* Unused. Silent compiler
warning. */
int *done = (int *)cls;
*done = 1;
}
@@ -524,6 +526,7 @@ int
main (int argc, char *const *argv)
{
unsigned int errorCount = 0;
+ (void)argc; (void)argv; /* Unused. Silent compiler warning. */
if (0 != curl_global_init (CURL_GLOBAL_WIN32))
return 2;
diff --git a/src/testcurl/test_quiesce_stream.c
b/src/testcurl/test_quiesce_stream.c
index ecdc2fdc..f908545a 100644
--- a/src/testcurl/test_quiesce_stream.c
+++ b/src/testcurl/test_quiesce_stream.c
@@ -48,6 +48,7 @@ http_PanicCallback (void *cls,
unsigned int line,
const char *reason)
{
+ (void)cls; /* Unused. Silent compiler warning. */
fprintf( stderr,
"PANIC: exit process: %s at %s:%u\n",
reason,
@@ -104,6 +105,7 @@ http_ContentReaderCallback (void *cls,
{
static const char alphabet[] =
"\nABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
struct ContentReaderUserdata *userdata = cls;
+ (void)pos;(void)max; /* Unused. Silent compiler warning. */
if( userdata->bytes_written >= 1024)
{
@@ -131,6 +133,9 @@ http_AccessHandlerCallback (void *cls,
void **con_cls )
{
int ret;
+ (void)cls;(void)url; /* Unused. Silent compiler
warning. */
+ (void)method;(void)version;(void)upload_data; /* Unused. Silent compiler
warning. */
+ (void)upload_data_size; /* Unused. Silent compiler
warning. */
/* Never respond on first call */
if (NULL == *con_cls)
diff --git a/src/testcurl/test_termination.c b/src/testcurl/test_termination.c
index 1fc7b53c..94e0faa4 100644
--- a/src/testcurl/test_termination.c
+++ b/src/testcurl/test_termination.c
@@ -57,6 +57,9 @@ connection_handler (void *cls,
void **ptr)
{
static int i;
+ (void)cls;(void)url; /* Unused. Silent compiler
warning. */
+ (void)method;(void)version;(void)upload_data; /* Unused. Silent compiler
warning. */
+ (void)upload_data_size; /* Unused. Silent compiler
warning. */
if (*ptr == NULL)
{
@@ -82,11 +85,12 @@ connection_handler (void *cls,
static size_t
write_data (void *ptr, size_t size, size_t nmemb, void *stream)
{
+ (void)ptr;(void)stream; /* Unused. Silent compiler warning. */
return size * nmemb;
}
int
-main ()
+main (void)
{
struct MHD_Daemon *daemon;
int port;
diff --git a/src/testcurl/test_timeout.c b/src/testcurl/test_timeout.c
index 8e2cba85..15b46eab 100644
--- a/src/testcurl/test_timeout.c
+++ b/src/testcurl/test_timeout.c
@@ -51,12 +51,13 @@ struct CBC
static void
-termination_cb (void *cls,
- struct MHD_Connection *connection,
- void **con_cls,
+termination_cb (void *cls,
+ struct MHD_Connection *connection,
+ void **con_cls,
enum MHD_RequestTerminationCode toe)
{
int *test = cls;
+ (void)connection;(void)con_cls; /* Unused. Silent compiler warning. */
switch (toe)
{
@@ -101,6 +102,7 @@ putBuffer (void *stream, size_t size, size_t nmemb, void
*ptr)
static size_t
putBuffer_fail (void *stream, size_t size, size_t nmemb, void *ptr)
{
+ (void)stream;(void)size;(void)nmemb;(void)ptr; /* Unused. Silent
compiler warning. */
return 0;
}
@@ -130,6 +132,7 @@ ahc_echo (void *cls,
int *done = cls;
struct MHD_Response *response;
int ret;
+ (void)version;(void)unused; /* Unused. Silent compiler warning. */
if (0 != strcmp ("PUT", method))
return MHD_NO; /* unexpected method */
@@ -313,6 +316,7 @@ int
main (int argc, char *const *argv)
{
unsigned int errorCount = 0;
+ (void)argc; /* Unused. Silent compiler warning. */
oneone = (NULL != strrchr (argv[0], (int) '/')) ?
(NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
diff --git a/src/testcurl/test_urlparse.c b/src/testcurl/test_urlparse.c
index 980a46b2..8675f19c 100644
--- a/src/testcurl/test_urlparse.c
+++ b/src/testcurl/test_urlparse.c
@@ -73,6 +73,7 @@ test_values (void *cls,
const char *key,
const char *value)
{
+ (void)cls;(void)kind; /* Unused. Silent compiler warning. */
if ( (0 == strcmp (key, "a")) &&
(0 == strcmp (value, "b")) )
matches += 1;
@@ -98,6 +99,7 @@ ahc_echo (void *cls,
const char *me = cls;
struct MHD_Response *response;
int ret;
+ (void)version;(void)upload_data;(void)upload_data_size; /* Unused.
Silent compiler warning. */
if (0 != strcmp (me, method))
return MHD_NO; /* unexpected method */
@@ -197,6 +199,7 @@ int
main (int argc, char *const *argv)
{
unsigned int errorCount = 0;
+ (void)argc; /* Unused. Silent compiler warning. */
oneone = (NULL != strrchr (argv[0], (int) '/')) ?
(NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [libmicrohttpd] branch master updated: Silenced compiler warnings in src/testcurl.,
gnunet <=