commit 424abcd21daf7000fa826a03de6188ea608a50ec
parent e7f77103503632ddd6ee6e87021de83271e9ebbf
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Tue, 31 Oct 2017 11:16:26 +0300
Additional compiler warnings fixes.
Diffstat:
6 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/src/examples/demo.c b/src/examples/demo.c
@@ -832,6 +832,7 @@ generate_page (void *cls,
static void
catcher (int sig)
{
+ (void)sig; /* Unused. Silent compiler warning. */
/* do nothing */
}
diff --git a/src/examples/demo_https.c b/src/examples/demo_https.c
@@ -831,6 +831,7 @@ generate_page (void *cls,
static void
catcher (int sig)
{
+ (void)sig; /* Unused. Silent compiler warning. */
/* do nothing */
}
@@ -839,7 +840,7 @@ catcher (int sig)
* setup handlers to ignore SIGPIPE.
*/
static void
-ignore_sigpipe ()
+ignore_sigpipe (void)
{
struct sigaction oldsig;
struct sigaction sig;
diff --git a/src/testcurl/https/tls_test_common.c b/src/testcurl/https/tls_test_common.c
@@ -27,8 +27,6 @@
#include "tls_test_keys.h"
-int curl_check_version (const char *req_version, ...);
-
FILE *
setup_ca_cert ()
{
@@ -278,13 +276,15 @@ gen_test_file_url (char *url,
int ret = 0;
char *doc_path;
size_t doc_path_len;
- size_t i;
/* setup test file path, url */
#ifdef PATH_MAX
doc_path_len = PATH_MAX > 4096 ? 4096 : PATH_MAX;
#else /* ! PATH_MAX */
doc_path_len = 4096;
#endif /* ! PATH_MAX */
+#ifdef WINDOWS
+ size_t i;
+#endif /* ! WINDOWS */
if (NULL == (doc_path = malloc (doc_path_len)))
{
fprintf (stderr, MHD_E_MEM);
diff --git a/src/testcurl/test_digestauth.c b/src/testcurl/test_digestauth.c
@@ -170,7 +170,7 @@ testDigestAuth ()
while (off < 8)
{
len = read(fd, rnd, 8);
- if (len == -1)
+ if (len == (size_t)-1)
{
fprintf(stderr, "Failed to read `%s': %s\n",
"/dev/urandom",
diff --git a/src/testcurl/test_digestauth_with_arguments.c b/src/testcurl/test_digestauth_with_arguments.c
@@ -165,7 +165,7 @@ testDigestAuth ()
while (off < 8)
{
len = read(fd, rnd, 8);
- if (len == -1)
+ if (len == (size_t)-1)
{
fprintf(stderr, "Failed to read `%s': %s\n",
"/dev/urandom",
diff --git a/src/testcurl/test_get_response_cleanup.c b/src/testcurl/test_get_response_cleanup.c
@@ -95,6 +95,8 @@ kill_curl (pid_t pid)
static ssize_t
push_callback (void *cls, uint64_t pos, char *buf, size_t max)
{
+ (void)cls;(void)pos; /* Unused. Silent compiler warning. */
+
if (max == 0)
return 0;
buf[0] = 'd';
@@ -125,6 +127,8 @@ ahc_echo (void *cls,
const char *me = cls;
struct MHD_Response *response;
int ret;
+ (void)url;(void)version; /* Unused. Silent compiler warning. */
+ (void)upload_data;(void)upload_data_size; /* Unused. Silent compiler warning. */
//fprintf (stderr, "In CB: %s!\n", method);
if (0 != strcmp (me, method))