You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ic...@apache.org on 2015/09/02 14:01:06 UTC
svn commit: r1700777 - in /httpd/httpd/trunk/modules/http2: h2_config.c
h2_io.c h2_response.c h2_session.c h2_switch.c h2_task.c h2_task_output.c
h2_to_h1.c h2_util.c
Author: icing
Date: Wed Sep 2 12:01:05 2015
New Revision: 1700777
URL: http://svn.apache.org/r1700777
Log:
eliminating some stricter compiler warnings in mod_h2
Modified:
httpd/httpd/trunk/modules/http2/h2_config.c
httpd/httpd/trunk/modules/http2/h2_io.c
httpd/httpd/trunk/modules/http2/h2_response.c
httpd/httpd/trunk/modules/http2/h2_session.c
httpd/httpd/trunk/modules/http2/h2_switch.c
httpd/httpd/trunk/modules/http2/h2_task.c
httpd/httpd/trunk/modules/http2/h2_task_output.c
httpd/httpd/trunk/modules/http2/h2_to_h1.c
httpd/httpd/trunk/modules/http2/h2_util.c
Modified: httpd/httpd/trunk/modules/http2/h2_config.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_config.c?rev=1700777&r1=1700776&r2=1700777&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_config.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_config.c Wed Sep 2 12:01:05 2015
@@ -332,7 +332,8 @@ static const char *h2_conf_set_direct(cm
return "value must be On or Off";
}
-#define AP_END_CMD { NULL }
+#define AP_END_CMD AP_INIT_TAKE1(NULL, NULL, NULL, RSRC_CONF, NULL)
+
const command_rec h2_cmds[] = {
AP_INIT_TAKE1("H2MaxSessionStreams", h2_conf_set_max_streams, NULL,
Modified: httpd/httpd/trunk/modules/http2/h2_io.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_io.c?rev=1700777&r1=1700776&r2=1700777&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_io.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_io.c Wed Sep 2 12:01:05 2015
@@ -40,6 +40,7 @@ h2_io *h2_io_create(int id, apr_pool_t *
static void h2_io_cleanup(h2_io *io)
{
+ (void)io;
}
void h2_io_destroy(h2_io *io)
Modified: httpd/httpd/trunk/modules/http2/h2_response.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_response.c?rev=1700777&r1=1700776&r2=1700777&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_response.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_response.c Wed Sep 2 12:01:05 2015
@@ -118,6 +118,7 @@ h2_response *h2_response_rcreate(int str
void h2_response_destroy(h2_response *response)
{
+ (void)response;
}
h2_response *h2_response_copy(apr_pool_t *pool, h2_response *from)
Modified: httpd/httpd/trunk/modules/http2/h2_session.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_session.c?rev=1700777&r1=1700776&r2=1700777&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_session.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_session.c Wed Sep 2 12:01:05 2015
@@ -99,6 +99,8 @@ static ssize_t send_cb(nghttp2_session *
h2_session *session = (h2_session *)userp;
apr_status_t status = send_data(session, (const char *)data, length);
+ (void)ngh2;
+ (void)flags;
if (status == APR_SUCCESS) {
return length;
}
@@ -140,6 +142,7 @@ static int on_data_chunk_recv_cb(nghttp2
h2_stream * stream;
apr_status_t status;
+ (void)flags;
if (session->aborted) {
return NGHTTP2_ERR_CALLBACK_FAILURE;
}
@@ -234,6 +237,7 @@ static int on_stream_close_cb(nghttp2_se
h2_session *session = (h2_session *)userp;
h2_stream *stream;
+ (void)ngh2;
if (session->aborted) {
return NGHTTP2_ERR_CALLBACK_FAILURE;
}
@@ -255,6 +259,7 @@ static int on_begin_headers_cb(nghttp2_s
const nghttp2_frame *frame, void *userp)
{
/* This starts a new stream. */
+ (void)ngh2;
int rv = stream_open((h2_session *)userp, frame->hd.stream_id);
if (rv != NGHTTP2_ERR_CALLBACK_FAILURE) {
/* on_header_cb or on_frame_recv_cb will dectect that stream
@@ -274,6 +279,8 @@ static int on_header_cb(nghttp2_session
h2_stream * stream;
apr_status_t status;
+ (void)ngh2;
+ (void)flags;
if (session->aborted) {
return NGHTTP2_ERR_CALLBACK_FAILURE;
}
@@ -1018,6 +1025,9 @@ static ssize_t stream_data_cb(nghttp2_se
h2_stream *stream;
AP_DEBUG_ASSERT(session);
+ (void)ng2s;
+ (void)buf;
+ (void)source;
stream = h2_stream_set_get(session->streams, stream_id);
if (!stream) {
ap_log_cerror(APLOG_MARK, APLOG_ERR, APR_NOTFOUND, session->c,
Modified: httpd/httpd/trunk/modules/http2/h2_switch.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_switch.c?rev=1700777&r1=1700776&r2=1700777&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_switch.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_switch.c Wed Sep 2 12:01:05 2015
@@ -65,6 +65,7 @@ static int h2_protocol_propose(conn_rec
int proposed = 0;
const char **protos = h2_h2_is_tls(c)? h2_tls_protos : h2_clear_protos;
+ (void)s;
if (strcmp(AP_PROTOCOL_HTTP1, ap_get_protocol(c))) {
/* We do not know how to switch from anything else but http/1.1.
*/
@@ -125,6 +126,7 @@ static int h2_protocol_switch(conn_rec *
const char **protos = h2_h2_is_tls(c)? h2_tls_protos : h2_clear_protos;
const char **p = protos;
+ (void)s;
while (*p) {
if (!strcmp(*p, protocol)) {
found = 1;
Modified: httpd/httpd/trunk/modules/http2/h2_task.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_task.c?rev=1700777&r1=1700776&r2=1700777&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_task.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_task.c Wed Sep 2 12:01:05 2015
@@ -116,6 +116,8 @@ static int h2_task_pre_conn(conn_rec* c,
{
h2_ctx *ctx = h2_ctx_get(c);
+
+ (void)arg;
if (h2_ctx_is_task(ctx)) {
h2_task_env *env = h2_ctx_get_task(ctx);
Modified: httpd/httpd/trunk/modules/http2/h2_task_output.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_task_output.c?rev=1700777&r1=1700776&r2=1700777&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_task_output.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_task_output.c Wed Sep 2 12:01:05 2015
@@ -37,6 +37,8 @@ h2_task_output *h2_task_output_create(h2
apr_bucket_alloc_t *bucket_alloc)
{
h2_task_output *output = apr_pcalloc(pool, sizeof(h2_task_output));
+
+ (void)bucket_alloc;
if (output) {
output->env = env;
output->state = H2_TASK_OUT_INIT;
Modified: httpd/httpd/trunk/modules/http2/h2_to_h1.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_to_h1.c?rev=1700777&r1=1700776&r2=1700777&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_to_h1.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_to_h1.c Wed Sep 2 12:01:05 2015
@@ -120,11 +120,13 @@ apr_status_t h2_to_h1_add_header(h2_to_h
else if (H2_HD_MATCH_LIT("cookie", name, nlen)) {
const char *existing = apr_table_get(to_h1->headers, "cookie");
if (existing) {
+ char *nval;
+
/* Cookie headers come separately in HTTP/2, but need
* to be merged by "; " (instead of default ", ")
*/
- char *hvalue = apr_pstrndup(to_h1->pool, value, vlen);
- char *nval = apr_psprintf(to_h1->pool, "%s; %s", existing, hvalue);
+ hvalue = apr_pstrndup(to_h1->pool, value, vlen);
+ nval = apr_psprintf(to_h1->pool, "%s; %s", existing, hvalue);
apr_table_setn(to_h1->headers, "Cookie", nval);
return APR_SUCCESS;
}
Modified: httpd/httpd/trunk/modules/http2/h2_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_util.c?rev=1700777&r1=1700776&r2=1700777&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_util.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_util.c Wed Sep 2 12:01:05 2015
@@ -410,7 +410,8 @@ apr_status_t h2_util_copy(apr_bucket_bri
{
apr_status_t status = APR_SUCCESS;
int same_alloc;
-
+
+ (void)msg;
AP_DEBUG_ASSERT(to);
AP_DEBUG_ASSERT(from);
same_alloc = (to->bucket_alloc == from->bucket_alloc);