From 8ca2f6aa924ae0423ab7a146fe039a47e7cdc0ff Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Wed, 30 Apr 2014 17:29:29 +0200 Subject: [PATCH 1/2] Fix build when use Clang libevent-client.c:355:43: error: missing field 'recv_callback' initializer [-Werror,-Wmissing-field-initializers] --- examples/libevent-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/libevent-client.c b/examples/libevent-client.c index 5194c4fe..fd4aad5b 100644 --- a/examples/libevent-client.c +++ b/examples/libevent-client.c @@ -352,7 +352,7 @@ static SSL* create_ssl(SSL_CTX *ssl_ctx) static void initialize_nghttp2_session(http2_session_data *session_data) { - nghttp2_session_callbacks callbacks = {0}; + nghttp2_session_callbacks callbacks; callbacks.send_callback = send_callback; callbacks.before_frame_send_callback = before_frame_send_callback; From 66ed7f6a59e47a9b913fdf8d851edf13c27fb528 Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Wed, 30 Apr 2014 17:30:24 +0200 Subject: [PATCH 2/2] Fix build when use Clang libevent-server.c:552:43: error: missing field 'recv_callback' initializer [-Werror,-Wmissing-field-initializers] --- 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..220b0207 100644 --- a/examples/libevent-server.c +++ b/examples/libevent-server.c @@ -549,7 +549,7 @@ static int on_stream_close_callback(nghttp2_session *session, static void initialize_nghttp2_session(http2_session_data *session_data) { - nghttp2_session_callbacks callbacks = {0}; + nghttp2_session_callbacks callbacks; callbacks.send_callback = send_callback; callbacks.on_frame_recv_callback = on_frame_recv_callback;