aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Uzunov <andrey.uzunov@gmail.com>2013-07-20 18:35:59 +0000
committerAndrey Uzunov <andrey.uzunov@gmail.com>2013-07-20 18:35:59 +0000
commita754b1b3cffd1bbeb8629d060f6466f358cad8c1 (patch)
tree7c4193fe602930e7e32f06b450ddc37cb8266127
parent22e0954068ff70395f77c00e36635efcd35e2e31 (diff)
downloadlibmicrohttpd-a754b1b3cffd1bbeb8629d060f6466f358cad8c1.tar.gz
libmicrohttpd-a754b1b3cffd1bbeb8629d060f6466f358cad8c1.zip
mhd2spdy: -Wextra warnings fixed
-rw-r--r--src/examples/mhd2spdy_http.c11
-rw-r--r--src/examples/mhd2spdy_http.h1
-rw-r--r--src/examples/mhd2spdy_spdy.c31
-rw-r--r--src/examples/mhd2spdy_spdy.h4
4 files changed, 42 insertions, 5 deletions
diff --git a/src/examples/mhd2spdy_http.c b/src/examples/mhd2spdy_http.c
index 2e9df268..2c8d4c23 100644
--- a/src/examples/mhd2spdy_http.c
+++ b/src/examples/mhd2spdy_http.c
@@ -27,6 +27,8 @@
27 27
28void * http_log_cb(void * cls, const char * uri) 28void * http_log_cb(void * cls, const char * uri)
29{ 29{
30 (void)cls;
31
30 struct HTTP_URI * http_uri; 32 struct HTTP_URI * http_uri;
31 33
32 PRINT_INFO2("log uri '%s'\n", uri); 34 PRINT_INFO2("log uri '%s'\n", uri);
@@ -55,6 +57,8 @@ http_iterate_cb(void *cls,
55 enum MHD_ValueKind kind, 57 enum MHD_ValueKind kind,
56 const char *name, const char *value) 58 const char *name, const char *value)
57{ 59{
60 (void)kind;
61
58 static char * const forbidden[] = {"Transfer-Encoding", 62 static char * const forbidden[] = {"Transfer-Encoding",
59 "Proxy-Connection", 63 "Proxy-Connection",
60 "Keep-Alive", 64 "Keep-Alive",
@@ -84,6 +88,8 @@ http_response_callback (void *cls,
84 char *buffer, 88 char *buffer,
85 size_t max) 89 size_t max)
86{ 90{
91 (void)pos;
92
87 int ret; 93 int ret;
88 struct Proxy *proxy = (struct Proxy *)cls; 94 struct Proxy *proxy = (struct Proxy *)cls;
89 void *newbody; 95 void *newbody;
@@ -207,6 +213,11 @@ http_cb_request (void *cls,
207 size_t *upload_data_size, 213 size_t *upload_data_size,
208 void **ptr) 214 void **ptr)
209{ 215{
216 (void)cls;
217 (void)url;
218 (void)upload_data;
219 (void)upload_data_size;
220
210 //struct MHD_Response *response; 221 //struct MHD_Response *response;
211 int ret; 222 int ret;
212 struct Proxy *proxy; 223 struct Proxy *proxy;
diff --git a/src/examples/mhd2spdy_http.h b/src/examples/mhd2spdy_http.h
index 0b5dde99..484e86d1 100644
--- a/src/examples/mhd2spdy_http.h
+++ b/src/examples/mhd2spdy_http.h
@@ -25,6 +25,7 @@
25 25
26#include "mhd2spdy_structures.h" 26#include "mhd2spdy_structures.h"
27 27
28
28int 29int
29http_cb_request (void *cls, 30http_cb_request (void *cls,
30 struct MHD_Connection *connection, 31 struct MHD_Connection *connection,
diff --git a/src/examples/mhd2spdy_spdy.c b/src/examples/mhd2spdy_spdy.c
index 99b2a3a1..9c5b94f5 100644
--- a/src/examples/mhd2spdy_spdy.c
+++ b/src/examples/mhd2spdy_spdy.c
@@ -70,9 +70,14 @@ void spdy_diec(const char *func, int error_code)
70 * spdylay_send_callback for the details. 70 * spdylay_send_callback for the details.
71 */ 71 */
72static ssize_t spdy_cb_send(spdylay_session *session, 72static ssize_t spdy_cb_send(spdylay_session *session,
73 const uint8_t *data, size_t length, int flags, 73 const uint8_t *data,
74 size_t length,
75 int flags,
74 void *user_data) 76 void *user_data)
75{ 77{
78 (void)session;
79 (void)flags;
80
76 //PRINT_INFO("spdy_cb_send called"); 81 //PRINT_INFO("spdy_cb_send called");
77 struct SPDY_Connection *connection; 82 struct SPDY_Connection *connection;
78 ssize_t rv; 83 ssize_t rv;
@@ -129,6 +134,9 @@ static ssize_t spdy_cb_recv(spdylay_session *session,
129 uint8_t *buf, size_t length, int flags, 134 uint8_t *buf, size_t length, int flags,
130 void *user_data) 135 void *user_data)
131{ 136{
137 (void)session;
138 (void)flags;
139
132 struct SPDY_Connection *connection; 140 struct SPDY_Connection *connection;
133 ssize_t rv; 141 ssize_t rv;
134 142
@@ -199,6 +207,8 @@ static void spdy_cb_on_ctrl_send(spdylay_session *session,
199 spdylay_frame_type type, 207 spdylay_frame_type type,
200 spdylay_frame *frame, void *user_data) 208 spdylay_frame *frame, void *user_data)
201{ 209{
210 (void)user_data;
211
202 //char **nv; 212 //char **nv;
203 //const char *name = NULL; 213 //const char *name = NULL;
204 int32_t stream_id; 214 int32_t stream_id;
@@ -224,6 +234,8 @@ void spdy_cb_on_ctrl_recv(spdylay_session *session,
224 spdylay_frame_type type, 234 spdylay_frame_type type,
225 spdylay_frame *frame, void *user_data) 235 spdylay_frame *frame, void *user_data)
226{ 236{
237 (void)user_data;
238
227 //struct SPDY_Request *req; 239 //struct SPDY_Request *req;
228 char **nv; 240 char **nv;
229 //const char *name = NULL; 241 //const char *name = NULL;
@@ -284,6 +296,9 @@ static void spdy_cb_on_stream_close(spdylay_session *session,
284 spdylay_status_code status_code, 296 spdylay_status_code status_code,
285 void *user_data) 297 void *user_data)
286{ 298{
299 (void)status_code;
300 (void)user_data;
301
287 struct Proxy * proxy = spdylay_session_get_stream_user_data(session, stream_id); 302 struct Proxy * proxy = spdylay_session_get_stream_user_data(session, stream_id);
288 303
289 assert(NULL != proxy); 304 assert(NULL != proxy);
@@ -312,6 +327,9 @@ static void spdy_cb_on_data_chunk_recv(spdylay_session *session, uint8_t flags,
312 const uint8_t *data, size_t len, 327 const uint8_t *data, size_t len,
313 void *user_data) 328 void *user_data)
314{ 329{
330 (void)flags;
331 (void)user_data;
332
315 //struct SPDY_Request *req; 333 //struct SPDY_Request *req;
316 struct Proxy *proxy; 334 struct Proxy *proxy;
317 proxy = spdylay_session_get_stream_user_data(session, stream_id); 335 proxy = spdylay_session_get_stream_user_data(session, stream_id);
@@ -335,6 +353,9 @@ static void spdy_cb_on_data_chunk_recv(spdylay_session *session, uint8_t flags,
335static void spdy_cb_on_data_recv(spdylay_session *session, 353static void spdy_cb_on_data_recv(spdylay_session *session,
336 uint8_t flags, int32_t stream_id, int32_t length, void *user_data) 354 uint8_t flags, int32_t stream_id, int32_t length, void *user_data)
337{ 355{
356 (void)length;
357 (void)user_data;
358
338 if(flags & SPDYLAY_DATA_FLAG_FIN) 359 if(flags & SPDYLAY_DATA_FLAG_FIN)
339 { 360 {
340 struct Proxy *proxy; 361 struct Proxy *proxy;
@@ -373,6 +394,8 @@ static int spdy_cb_ssl_select_next_proto(SSL* ssl,
373 const unsigned char *in, unsigned int inlen, 394 const unsigned char *in, unsigned int inlen,
374 void *arg) 395 void *arg)
375{ 396{
397 (void)ssl;
398
376 //PRINT_INFO("spdy_cb_ssl_select_next_proto"); 399 //PRINT_INFO("spdy_cb_ssl_select_next_proto");
377 int rv; 400 int rv;
378 uint16_t *spdy_proto_version; 401 uint16_t *spdy_proto_version;
@@ -505,6 +528,8 @@ bool spdy_ctl_select(fd_set * read_fd_set,
505 fd_set * except_fd_set, 528 fd_set * except_fd_set,
506 struct SPDY_Connection *connection) 529 struct SPDY_Connection *connection)
507{ 530{
531 (void)except_fd_set;
532
508 bool ret = false; 533 bool ret = false;
509 534
510 if(spdylay_session_want_read(connection->session) || 535 if(spdylay_session_want_read(connection->session) ||
@@ -687,7 +712,7 @@ spdy_request(const char **nv, struct Proxy *proxy)
687 712
688 713
689void 714void
690spdy_get_pollfdset(struct pollfd fds[], struct SPDY_Connection *connections[], int max_size, nfds_t *real_size) 715spdy_get_pollfdset(struct pollfd fds[], struct SPDY_Connection *connections[], unsigned int max_size, nfds_t *real_size)
691{ 716{
692 struct SPDY_Connection *connection; 717 struct SPDY_Connection *connection;
693 struct Proxy *proxy; 718 struct Proxy *proxy;
@@ -756,7 +781,7 @@ int
756spdy_get_selectfdset(fd_set * read_fd_set, 781spdy_get_selectfdset(fd_set * read_fd_set,
757 fd_set * write_fd_set, 782 fd_set * write_fd_set,
758 fd_set * except_fd_set, 783 fd_set * except_fd_set,
759 struct SPDY_Connection *connections[], int max_size, nfds_t *real_size) 784 struct SPDY_Connection *connections[], unsigned int max_size, nfds_t *real_size)
760{ 785{
761 struct SPDY_Connection *connection; 786 struct SPDY_Connection *connection;
762 struct Proxy *proxy; 787 struct Proxy *proxy;
diff --git a/src/examples/mhd2spdy_spdy.h b/src/examples/mhd2spdy_spdy.h
index e9568ea8..04fcf9d2 100644
--- a/src/examples/mhd2spdy_spdy.h
+++ b/src/examples/mhd2spdy_spdy.h
@@ -47,14 +47,14 @@ void
47spdy_free_connection(struct SPDY_Connection * connection); 47spdy_free_connection(struct SPDY_Connection * connection);
48 48
49void 49void
50spdy_get_pollfdset(struct pollfd fds[], struct SPDY_Connection *connections[], int max_size, nfds_t *real_size); 50spdy_get_pollfdset(struct pollfd fds[], struct SPDY_Connection *connections[], unsigned int max_size, nfds_t *real_size);
51 51
52 52
53int 53int
54spdy_get_selectfdset(fd_set * read_fd_set, 54spdy_get_selectfdset(fd_set * read_fd_set,
55 fd_set * write_fd_set, 55 fd_set * write_fd_set,
56 fd_set * except_fd_set, 56 fd_set * except_fd_set,
57 struct SPDY_Connection *connections[], int max_size, nfds_t *real_size); 57 struct SPDY_Connection *connections[], unsigned int max_size, nfds_t *real_size);
58 58
59void 59void
60spdy_run(struct pollfd fds[], struct SPDY_Connection *connections[], int size); 60spdy_run(struct pollfd fds[], struct SPDY_Connection *connections[], int size);