]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
fixing msvc compiler warnings
authorStefan Eissing <icing@apache.org>
Tue, 25 Aug 2015 09:56:33 +0000 (09:56 +0000)
committerStefan Eissing <icing@apache.org>
Tue, 25 Aug 2015 09:56:33 +0000 (09:56 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1697634 13f79535-47bb-0310-9956-ffa450edef68

modules/http2/h2_config.c
modules/http2/h2_session.c
modules/http2/h2_stream_set.c
modules/http2/h2_worker.c

index 368919df6a5d12616e630e578da2a84fc49dc3b2..410522e73fb202bdeffddb189b10886e39884d89 100644 (file)
@@ -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
 };
 
 
index 710c998943c88df61aff6230bb2159ee86354630..b894fee5bafb940c5424d1460294e9a5b20a54e1 100644 (file)
@@ -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",
index d4022c4ac4aef1fa1a6832efc10ab72be8220f30..dddd2e3990820e0ff6ea4c56181172ad1f651ec2 100644 (file)
@@ -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;
index b34f2b1f49a18233870fb4c24d4f359d0420cf80..8145b7aaa5f72bdb5d5683651696970768f9f114 100644 (file)
@@ -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;