Browse Source

Silenced compiler warnings in src/testczzuf.

Evgeny Grin (Karlson2k) 8 years ago
parent
commit
e7f7710350

+ 2 - 0
src/testzzuf/test_get.c

@@ -72,6 +72,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 */
@@ -299,6 +300,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;

+ 3 - 0
src/testzzuf/test_get_chunked.c

@@ -99,6 +99,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 */
@@ -317,6 +319,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;

+ 5 - 0
src/testzzuf/test_long_header.c

@@ -50,6 +50,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;
 }
 
@@ -63,6 +64,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;
 }
 
@@ -78,6 +80,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 */
@@ -220,6 +224,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;

+ 5 - 0
src/testzzuf/test_post.c

@@ -58,6 +58,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);
@@ -93,6 +94,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 == strcmp (key, "name")) &&
       (size == strlen ("daniel")) && (0 == strncmp (value, "daniel", size)))
@@ -116,6 +119,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))
     {
@@ -379,6 +383,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;

+ 5 - 0
src/testzzuf/test_post_form.c

@@ -56,6 +56,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);
@@ -90,6 +91,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 (key == NULL)
     return MHD_YES;
@@ -119,6 +122,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))
     {
@@ -395,6 +399,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;

+ 2 - 0
src/testzzuf/test_put.c

@@ -86,6 +86,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 */
@@ -346,6 +347,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;

+ 2 - 0
src/testzzuf/test_put_chunked.c

@@ -87,6 +87,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 */
@@ -358,6 +359,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;

+ 2 - 0
src/testzzuf/test_put_large.c

@@ -94,6 +94,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 */
@@ -364,6 +365,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;