diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2020-12-23 22:40:59 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2020-12-23 22:40:59 +0300 |
commit | 6d7f0a8f54bed3282199afc1bbe9c35c8af80a7f (patch) | |
tree | 3d67768870118ada13569e4d8b9487be57e17297 /src/microhttpd | |
parent | aee82048c22265757b1b2f99aa709ccdbf6c48ff (diff) | |
download | libmicrohttpd-6d7f0a8f54bed3282199afc1bbe9c35c8af80a7f.tar.gz libmicrohttpd-6d7f0a8f54bed3282199afc1bbe9c35c8af80a7f.zip |
Fixed and muted compiler warnings
Diffstat (limited to 'src/microhttpd')
-rw-r--r-- | src/microhttpd/mhd_itc_types.h | 5 | ||||
-rw-r--r-- | src/microhttpd/mhd_sockets.c | 1 | ||||
-rw-r--r-- | src/microhttpd/test_postprocessor.c | 3 | ||||
-rw-r--r-- | src/microhttpd/test_postprocessor_md.c | 18 |
4 files changed, 25 insertions, 2 deletions
diff --git a/src/microhttpd/mhd_itc_types.h b/src/microhttpd/mhd_itc_types.h index bb354d37..04d30239 100644 --- a/src/microhttpd/mhd_itc_types.h +++ b/src/microhttpd/mhd_itc_types.h | |||
@@ -67,7 +67,7 @@ struct MHD_itc_ | |||
67 | /** | 67 | /** |
68 | * Static initialiser for struct MHD_itc_ | 68 | * Static initialiser for struct MHD_itc_ |
69 | */ | 69 | */ |
70 | #define MHD_ITC_STATIC_INIT_INVALID { -1, -1 } | 70 | #define MHD_ITC_STATIC_INIT_INVALID { { -1, -1 } } |
71 | 71 | ||
72 | 72 | ||
73 | #elif defined(_MHD_ITC_SOCKETPAIR) | 73 | #elif defined(_MHD_ITC_SOCKETPAIR) |
@@ -86,7 +86,8 @@ struct MHD_itc_ | |||
86 | /** | 86 | /** |
87 | * Static initialiser for struct MHD_itc_ | 87 | * Static initialiser for struct MHD_itc_ |
88 | */ | 88 | */ |
89 | #define MHD_ITC_STATIC_INIT_INVALID { MHD_INVALID_SOCKET, MHD_INVALID_SOCKET } | 89 | #define MHD_ITC_STATIC_INIT_INVALID \ |
90 | { { MHD_INVALID_SOCKET, MHD_INVALID_SOCKET } } | ||
90 | 91 | ||
91 | #endif /* _MHD_ITC_SOCKETPAIR */ | 92 | #endif /* _MHD_ITC_SOCKETPAIR */ |
92 | 93 | ||
diff --git a/src/microhttpd/mhd_sockets.c b/src/microhttpd/mhd_sockets.c index a00330a3..ef3dc35d 100644 --- a/src/microhttpd/mhd_sockets.c +++ b/src/microhttpd/mhd_sockets.c | |||
@@ -538,6 +538,7 @@ MHD_socket_cork_ (MHD_socket sock, | |||
538 | #endif | 538 | #endif |
539 | #else | 539 | #else |
540 | /* do not have MHD_TCP_CORK_NOPUSH at all */ | 540 | /* do not have MHD_TCP_CORK_NOPUSH at all */ |
541 | (void) sock; (void) on; /* Mute compiler warnings */ | ||
541 | return 0; | 542 | return 0; |
542 | #endif | 543 | #endif |
543 | } | 544 | } |
diff --git a/src/microhttpd/test_postprocessor.c b/src/microhttpd/test_postprocessor.c index b77bfb26..4c2ec2e7 100644 --- a/src/microhttpd/test_postprocessor.c +++ b/src/microhttpd/test_postprocessor.c | |||
@@ -462,6 +462,9 @@ value_checker2 (void *cls, | |||
462 | uint64_t off, | 462 | uint64_t off, |
463 | size_t size) | 463 | size_t size) |
464 | { | 464 | { |
465 | (void) cls; (void) kind; (void) key; /* Mute compiler warnings */ | ||
466 | (void) filename; (void) content_type; (void) transfer_encoding; | ||
467 | (void) data; (void) off; (void) size; | ||
465 | return MHD_YES; | 468 | return MHD_YES; |
466 | } | 469 | } |
467 | 470 | ||
diff --git a/src/microhttpd/test_postprocessor_md.c b/src/microhttpd/test_postprocessor_md.c index 2d1cae61..e07a94c3 100644 --- a/src/microhttpd/test_postprocessor_md.c +++ b/src/microhttpd/test_postprocessor_md.c | |||
@@ -50,6 +50,8 @@ MHD_lookup_connection_value_n (struct MHD_Connection *connection, | |||
50 | const char **value_ptr, | 50 | const char **value_ptr, |
51 | size_t *value_size_ptr) | 51 | size_t *value_size_ptr) |
52 | { | 52 | { |
53 | (void) connection; (void) kind; (void) key; /* Mute compiler warnings */ | ||
54 | (void) key_size; (void) value_ptr; (void) value_size_ptr; | ||
53 | return MHD_NO; | 55 | return MHD_NO; |
54 | } | 56 | } |
55 | 57 | ||
@@ -73,6 +75,9 @@ post_data_iterator (void *cls, | |||
73 | uint64_t off, | 75 | uint64_t off, |
74 | size_t size) | 76 | size_t size) |
75 | { | 77 | { |
78 | (void) cls; (void) kind; (void) filename; /* Mute compiler warnings */ | ||
79 | (void) content_type; (void) transfer_encoding; | ||
80 | (void) off; /* FIXME: shoudn't be checked? */ | ||
76 | #if DEBUG | 81 | #if DEBUG |
77 | fprintf (stderr, | 82 | fprintf (stderr, |
78 | "%s\t%s\n", | 83 | "%s\t%s\n", |
@@ -120,6 +125,8 @@ post_data_iterator2 (void *cls, | |||
120 | uint64_t off, | 125 | uint64_t off, |
121 | size_t size) | 126 | size_t size) |
122 | { | 127 | { |
128 | (void) cls; (void) kind; (void) filename; /* Mute compiler warnings */ | ||
129 | (void) content_type; (void) transfer_encoding; | ||
123 | static char seen[16]; | 130 | static char seen[16]; |
124 | 131 | ||
125 | #if DEBUG | 132 | #if DEBUG |
@@ -154,6 +161,9 @@ post_data_iterator3 (void *cls, | |||
154 | uint64_t off, | 161 | uint64_t off, |
155 | size_t size) | 162 | size_t size) |
156 | { | 163 | { |
164 | (void) cls; (void) kind; (void) filename; /* Mute compiler warnings */ | ||
165 | (void) content_type; (void) transfer_encoding; | ||
166 | (void) off; /* FIXME: shoudn't be checked? */ | ||
157 | #if DEBUG | 167 | #if DEBUG |
158 | fprintf (stderr, | 168 | fprintf (stderr, |
159 | "%s\t%s\n", | 169 | "%s\t%s\n", |
@@ -182,6 +192,9 @@ post_data_iterator4 (void *cls, | |||
182 | uint64_t off, | 192 | uint64_t off, |
183 | size_t size) | 193 | size_t size) |
184 | { | 194 | { |
195 | (void) cls; (void) kind; (void) key; /* Mute compiler warnings */ | ||
196 | (void) filename; (void) content_type; (void) transfer_encoding; | ||
197 | (void) off; /* FIXME: shoudn't be checked? */ | ||
185 | #if DEBUG | 198 | #if DEBUG |
186 | fprintf (stderr, | 199 | fprintf (stderr, |
187 | "%s\t%s\n", | 200 | "%s\t%s\n", |
@@ -207,6 +220,10 @@ post_data_iterator5 (void *cls, | |||
207 | uint64_t off, | 220 | uint64_t off, |
208 | size_t size) | 221 | size_t size) |
209 | { | 222 | { |
223 | (void) cls; (void) kind; (void) key; /* Mute compiler warnings */ | ||
224 | (void) filename; (void) content_type; (void) transfer_encoding; | ||
225 | (void) data; (void) off; (void) size; | ||
226 | |||
210 | found++; | 227 | found++; |
211 | return MHD_YES; | 228 | return MHD_YES; |
212 | } | 229 | } |
@@ -215,6 +232,7 @@ post_data_iterator5 (void *cls, | |||
215 | int | 232 | int |
216 | main (int argc, char *argv[]) | 233 | main (int argc, char *argv[]) |
217 | { | 234 | { |
235 | (void) argc; (void) argv; | ||
218 | struct MHD_PostProcessor *postprocessor; | 236 | struct MHD_PostProcessor *postprocessor; |
219 | 237 | ||
220 | { | 238 | { |