Yeah... I do like -Werror, so that forces a clean build, so that *real* warnings don't get buried in a bunch of useless warnings.
On Wed, Sep 16, 2015 at 10:08 AM, Jim Jagielski <[email protected]> wrote: > All this is due to changes mode with the mainter-mode and > which causes build stop error and stop for these kinds > of warnings. These are simple 'squash warning' patches. > > > On Sep 16, 2015, at 10:50 AM, Greg Stein <[email protected]> wrote: > > > > On Wed, Sep 16, 2015 at 9:18 AM, <[email protected]> wrote: > > Author: jim > > Date: Wed Sep 16 14:18:49 2015 > > New Revision: 1703415 > > >... > > Modified: > httpd/test/framework/trunk/c-modules/test_session/mod_test_session.c > > URL: > http://svn.apache.org/viewvc/httpd/test/framework/trunk/c-modules/test_session/mod_test_session.c?rev=1703415&r1=1703414&r2=1703415&view=diff > > > ============================================================================== > > --- httpd/test/framework/trunk/c-modules/test_session/mod_test_session.c > (original) > > +++ httpd/test/framework/trunk/c-modules/test_session/mod_test_session.c > Wed Sep 16 14:18:49 2015 > > @@ -149,7 +149,6 @@ static apr_status_t test_session_encode( > > > > static apr_status_t test_session_decode(request_rec * r, session_rec * > z) > > { > > - apr_status_t result = OK; > > const size_t prefix_len = strlen(TEST_SESSION_ENCODING_PREFIX); > > test_session_dcfg_t *dconf = ap_get_module_config(r->per_dir_config, > > > &test_session_module); > > @@ -203,7 +202,7 @@ static int test_session_handler(request_ > > return DECLINED; > > > > /* Copy the header for SessionHeader from the request to the > response. */ > > - if (overrides = apr_table_get(r->headers_in, TEST_SESSION_HEADER)) > > + if ((overrides = apr_table_get(r->headers_in, TEST_SESSION_HEADER))) > > apr_table_setn(r->headers_out, TEST_SESSION_HEADER, overrides); > > > > /* Additional commands to test the session API via POST. */ > > @@ -240,15 +239,15 @@ static int test_session_handler(request_ > > } > > else if (!strcmp(pair->name, "name")) { > > apr_size_t len; > > - apr_brigade_length(pair->value, 1, &len); > > + apr_brigade_length(pair->value, 1, (apr_off_t *)&len); > > > > This seems really dangerous. Aren't there cases where sizeof(apr_size_t) > != sizeof(apr_off_t) ?? > > > > fieldName = apr_pcalloc(r->pool, sizeof(char) * len + > 1); > > - result = apr_brigade_flatten(pair->value, fieldName, > &len); > > + result = apr_brigade_flatten(pair->value, fieldName, > (apr_size_t *)&len); > > > > This seems unnecessary. &len should already be apr_size_t * > > > > } > > else if (!strcmp(pair->name, "value")) { > > apr_size_t len; > > - apr_brigade_length(pair->value, 1, &len); > > + apr_brigade_length(pair->value, 1, (apr_off_t *)&len); > > fieldValue = apr_pcalloc(r->pool, sizeof(char) * len + > 1); > > - result = apr_brigade_flatten(pair->value, fieldValue, > &len); > > + result = apr_brigade_flatten(pair->value, fieldValue, > (apr_size_t *)&len); > > > > These two, same as above. > > > > Heh. I haven't reviewed httpd code for years. But I saw a change to > mod_authany.c and thought "what is that? isn't that module crazy stable?" > ... curiosity :-P > > > > Cheers, > > -g > > > >
