From d3ba2a832f7c1a0d6447332e81067c8824f20fa6 Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Tue, 25 Aug 2015 09:56:33 +0000 Subject: [PATCH] fixing msvc compiler warnings git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1697634 13f79535-47bb-0310-9956-ffa450edef68 --- modules/http2/h2_config.c | 7 +++---- modules/http2/h2_session.c | 9 +++++---- modules/http2/h2_stream_set.c | 2 +- modules/http2/h2_worker.c | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/http2/h2_config.c b/modules/http2/h2_config.c index 368919df6a..410522e73f 100644 --- a/modules/http2/h2_config.c +++ b/modules/http2/h2_config.c @@ -299,9 +299,8 @@ static const char *h2_conf_set_direct(cmd_parms *parms, return "value must be On or Off"; } -#ifndef _MSC_VER -#pragma GCC diagnostic ignored "-Wmissing-braces" -#endif +#define AP_END_CMD { NULL } + const command_rec h2_cmds[] = { AP_INIT_TAKE1("H2MaxSessionStreams", h2_conf_set_max_streams, NULL, RSRC_CONF, "maximum number of open streams per session"), @@ -325,7 +324,7 @@ const command_rec h2_cmds[] = { RSRC_CONF, "on to enable direct HTTP/2 mode"), AP_INIT_TAKE1("H2SessionExtraFiles", h2_conf_set_session_extra_files, NULL, RSRC_CONF, "number of extra file a session might keep open"), - { NULL, NULL, NULL, 0, 0, NULL } + AP_END_CMD }; diff --git a/modules/http2/h2_session.c b/modules/http2/h2_session.c index 710c998943..b894fee5ba 100644 --- a/modules/http2/h2_session.c +++ b/modules/http2/h2_session.c @@ -1074,11 +1074,12 @@ typedef struct { static int submit_response(h2_session *session, h2_response *response) { + nghttp2_data_provider provider; int rv; - nghttp2_data_provider provider = { - (nghttp2_data_source) response->stream_id, - (nghttp2_data_source_read_callback) stream_data_cb - }; + + memset(&provider, 0, sizeof(provider)); + provider.source.fd = response->stream_id; + provider.read_callback = stream_data_cb; ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, session->c, "h2_stream(%ld-%d): submitting response %s", diff --git a/modules/http2/h2_stream_set.c b/modules/http2/h2_stream_set.c index d4022c4ac4..dddd2e3990 100644 --- a/modules/http2/h2_stream_set.c +++ b/modules/http2/h2_stream_set.c @@ -135,7 +135,7 @@ int h2_stream_set_is_empty(h2_stream_set *sp) } h2_stream *h2_stream_set_find(h2_stream_set *sp, - h2_stream_set_match_fn match, void *ctx) + h2_stream_set_match_fn *match, void *ctx) { h2_stream *s = NULL; int i; diff --git a/modules/http2/h2_worker.c b/modules/http2/h2_worker.c index b34f2b1f49..8145b7aaa5 100644 --- a/modules/http2/h2_worker.c +++ b/modules/http2/h2_worker.c @@ -26,7 +26,7 @@ #include "h2_task.h" #include "h2_worker.h" -static void *execute(apr_thread_t *thread, void *wctx) +static void* APR_THREAD_FUNC execute(apr_thread_t *thread, void *wctx) { h2_worker *worker = (h2_worker *)wctx; apr_status_t status = APR_SUCCESS; -- 2.40.0