From 941236948fde1359111b07c1acc8b4f294d22a15 Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Wed, 30 Apr 2014 16:34:39 +0200 Subject: [PATCH 1/5] Fix GCC when use -Wpedantic nghttp2_int.h:50:33: error: comma at end of enumerator list [-Werror=pedantic] --- lib/nghttp2_int.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nghttp2_int.h b/lib/nghttp2_int.h index 678d1eef..2a77ed4f 100644 --- a/lib/nghttp2_int.h +++ b/lib/nghttp2_int.h @@ -47,7 +47,7 @@ typedef enum { NGHTTP2_ERR_CREDENTIAL_PENDING = -101, NGHTTP2_ERR_BUFFER_ERROR = -102, NGHTTP2_ERR_IGN_HEADER_BLOCK = -103, - NGHTTP2_ERR_IGN_PAYLOAD = -104, + NGHTTP2_ERR_IGN_PAYLOAD = -104 } nghttp2_internal_error; #endif /* NGHTTP2_INT_H */ From 0f5c28ac4644de8ff11e379bfc049ab199964569 Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Wed, 30 Apr 2014 16:36:44 +0200 Subject: [PATCH 2/5] Fix GCC when use -Wpedantic nghttp2_hd.h:115:30: error: comma at end of enumerator list [-Werror=pedantic] --- lib/nghttp2_hd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nghttp2_hd.h b/lib/nghttp2_hd.h index e87a5596..ef65b4ce 100644 --- a/lib/nghttp2_hd.h +++ b/lib/nghttp2_hd.h @@ -112,7 +112,7 @@ typedef enum { NGHTTP2_HD_STATE_CHECK_VALUELEN, NGHTTP2_HD_STATE_READ_VALUELEN, NGHTTP2_HD_STATE_READ_VALUEHUFF, - NGHTTP2_HD_STATE_READ_VALUE, + NGHTTP2_HD_STATE_READ_VALUE } nghttp2_hd_inflate_state; typedef struct { From 763cdc34993dc68c5844a374b9911df59c196f46 Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Wed, 30 Apr 2014 16:37:29 +0200 Subject: [PATCH 3/5] Fix GCC when use -Wpedantic nghttp2_stream.h:94:43: error: comma at end of enumerator list [-Werror=pedantic] --- lib/nghttp2_stream.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nghttp2_stream.h b/lib/nghttp2_stream.h index ceb207b7..256510e2 100644 --- a/lib/nghttp2_stream.h +++ b/lib/nghttp2_stream.h @@ -91,7 +91,7 @@ typedef enum { NGHTTP2_STREAM_FLAG_DEFERRED_USER = 0x08, /* bitwise OR of NGHTTP2_STREAM_FLAG_DEFERRED_FLOW_CONTROL and NGHTTP2_STREAM_FLAG_DEFERRED_USER. */ - NGHTTP2_STREAM_FLAG_DEFERRED_ALL = 0x0c, + NGHTTP2_STREAM_FLAG_DEFERRED_ALL = 0x0c } nghttp2_stream_flag; From 33a6851abef4632410997e42da638d44a2c31708 Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Wed, 30 Apr 2014 16:38:57 +0200 Subject: [PATCH 4/5] Fix GCC build with -Werror nghttp2_session.c:1615:9: error: C++ style comments are not allowed in ISO C90 [-Werror] --- lib/nghttp2_session.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/nghttp2_session.c b/lib/nghttp2_session.c index 0e7eeb24..a611e7de 100644 --- a/lib/nghttp2_session.c +++ b/lib/nghttp2_session.c @@ -1612,8 +1612,8 @@ static int nghttp2_session_prep_frame(nghttp2_session *session, frame->hd.stream_id = session->next_stream_id; session->next_stream_id += 2; - // We first open strea with default priority. This is because - // priority may be adjusted in callback. + /* We first open strea with default priority. This is because + priority may be adjusted in callback. */ nghttp2_priority_spec_default_init(&pri_spec_default); stream = nghttp2_session_open_stream From fa2fbe944f195b58dfa53957259e18ea94705b7a Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Wed, 30 Apr 2014 16:46:46 +0200 Subject: [PATCH 5/5] Fix GCC build with -Werror libevent-server.c:691:8: error: C++ style comments are not allowed in ISO C90 --- examples/libevent-server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/libevent-server.c b/examples/libevent-server.c index 1f515d13..46eef12c 100644 --- a/examples/libevent-server.c +++ b/examples/libevent-server.c @@ -688,7 +688,7 @@ static void start_listen(struct event_base *evbase, const char *service, hints.ai_flags = AI_PASSIVE; #ifdef AI_ADDRCONFIG hints.ai_flags |= AI_ADDRCONFIG; -#endif // AI_ADDRCONFIG +#endif /* AI_ADDRCONFIG */ rv = getaddrinfo(NULL, service, &hints, &res); if(rv != 0) {