You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by NormW <no...@gknw.net> on 2015/09/04 00:52:51 UTC
r1701005 httpd-trunk\server\protocols.c
Hi again,
Pushing passed previous problem, now arrive at:
> D:\Projects\svn\httpd-trunk\server>svn diff
> Index: protocol.c
> ===================================================================
> --- protocol.c (revision 1701142)
> +++ protocol.c (working copy)
> @@ -1981,10 +1981,10 @@
> server_rec *s,
> apr_array_header_t *choices)
> {
> + apr_array_header_t *proposals;
> apr_pool_t *pool = r? r->pool : c->pool;
> core_server_config *conf = ap_get_core_module_config(s->module_config);
> const char *protocol = NULL, *existing = ap_get_protocol(c);;
> - apr_array_header_t *proposals;
>
> if (APLOGcdebug(c)) {
> const char *p = apr_array_pstrcat(pool, conf->protocols, ',');
After a while it becomes second nature I believe.
Regards,
Norm
Re: r1701005 httpd-trunk\server\protocols.c
Posted by Stefan Eissing <st...@greenbytes.de>.
I think we are all tired of fixing compiler warnings on committed code. I do not see those warnings in --maintainer-mode on OS X and yet, clang is able to generate warnings about very, very obscure things. So I assume we are not using the compiler to its fullest extend and are doings this "by hand" which is very inefficient for everyone.
There are autoconf macros out there that check support for -Wxxx and enable when available. Can we use something like this, please?
As you might have noticed, I am a bit busy right now. Does someone else have the time and willingness to dive into this?
Cheers,
Stefan
> Am 04.09.2015 um 09:20 schrieb NormW <no...@gknw.net>:
>
> On 4/09/2015 5:02 PM, Gregg Smith wrote:
>> On 9/3/2015 9:23 PM, NormW wrote:
>>> On 4/09/2015 9:05 AM, Yann Ylavic wrote:
>>>> On Fri, Sep 4, 2015 at 12:52 AM, NormW <no...@gknw.net> wrote:
>>>>> Hi again,
>>>>> Pushing passed previous problem, now arrive at:
>>>>>>
>>>>>> D:\Projects\svn\httpd-trunk\server>svn diff
>>>>>> Index: protocol.c
>>>>>> ===================================================================
>>>>>> --- protocol.c (revision 1701142)
>>>>>> +++ protocol.c (working copy)
>>>>>> @@ -1981,10 +1981,10 @@
>>>>>> server_rec *s,
>>>>>> apr_array_header_t
>>>>>> *choices)
>>>>>> {
>>>>>> + apr_array_header_t *proposals;
>>>>>> apr_pool_t *pool = r? r->pool : c->pool;
>>>>>> core_server_config *conf =
>>>>>> ap_get_core_module_config(s->module_config);
>>>>>> const char *protocol = NULL, *existing = ap_get_protocol(c);;
>>>>>> - apr_array_header_t *proposals;
>>>>
>>>> Hm, aren't there other/many places in the httpd code where non
>>>> initialized variables are declared after the initialized ones?
>>>>
>>> I am hoping my compiler is at least consistent!
>>> Not sure of what the rules are well enough to be an expert. I know
>>> Windows can be as pedantic as mine. See if Gregg asks for a similar
>>> change first, just to be sure.
>>> Norm
>> No it does not build on VC9 as is.
>> .\server\protocol.c(1987) : error C2143: syntax error : missing ';'
>> before 'type'
>> .\server\protocol.c(1998) : error C2065: 'proposals' : undeclared
>> identifier
>>
>> But fresh eyes see the ;; on the end of line 1986
>> const char *protocol = NULL, *existing = ap_get_protocol(c);;
>> Why this trips our compilers I have no idea but one ; should be sufficient.
>> fixed in r1701165
>>
> Works also for me; apologies for the red herring - likely to do with operating a computer before the first coffee of the day - never noticed the ';;' either.
> Norm
>
<green/>bytes GmbH
Hafenweg 16, 48155 Münster, Germany
Phone: +49 251 2807760. Amtsgericht Münster: HRB5782
Re: r1701005 httpd-trunk\server\protocols.c
Posted by NormW <no...@gknw.net>.
On 4/09/2015 5:02 PM, Gregg Smith wrote:
> On 9/3/2015 9:23 PM, NormW wrote:
>> On 4/09/2015 9:05 AM, Yann Ylavic wrote:
>>> On Fri, Sep 4, 2015 at 12:52 AM, NormW <no...@gknw.net> wrote:
>>>> Hi again,
>>>> Pushing passed previous problem, now arrive at:
>>>>>
>>>>> D:\Projects\svn\httpd-trunk\server>svn diff
>>>>> Index: protocol.c
>>>>> ===================================================================
>>>>> --- protocol.c (revision 1701142)
>>>>> +++ protocol.c (working copy)
>>>>> @@ -1981,10 +1981,10 @@
>>>>> server_rec *s,
>>>>> apr_array_header_t
>>>>> *choices)
>>>>> {
>>>>> + apr_array_header_t *proposals;
>>>>> apr_pool_t *pool = r? r->pool : c->pool;
>>>>> core_server_config *conf =
>>>>> ap_get_core_module_config(s->module_config);
>>>>> const char *protocol = NULL, *existing = ap_get_protocol(c);;
>>>>> - apr_array_header_t *proposals;
>>>
>>> Hm, aren't there other/many places in the httpd code where non
>>> initialized variables are declared after the initialized ones?
>>>
>> I am hoping my compiler is at least consistent!
>> Not sure of what the rules are well enough to be an expert. I know
>> Windows can be as pedantic as mine. See if Gregg asks for a similar
>> change first, just to be sure.
>> Norm
> No it does not build on VC9 as is.
> .\server\protocol.c(1987) : error C2143: syntax error : missing ';'
> before 'type'
> .\server\protocol.c(1998) : error C2065: 'proposals' : undeclared
> identifier
>
> But fresh eyes see the ;; on the end of line 1986
> const char *protocol = NULL, *existing = ap_get_protocol(c);;
> Why this trips our compilers I have no idea but one ; should be sufficient.
> fixed in r1701165
>
Works also for me; apologies for the red herring - likely to do with
operating a computer before the first coffee of the day - never noticed
the ';;' either.
Norm
Re: r1701005 httpd-trunk\server\protocols.c
Posted by Gregg Smith <gl...@gknw.net>.
On 9/3/2015 9:23 PM, NormW wrote:
> On 4/09/2015 9:05 AM, Yann Ylavic wrote:
>> On Fri, Sep 4, 2015 at 12:52 AM, NormW <no...@gknw.net> wrote:
>>> Hi again,
>>> Pushing passed previous problem, now arrive at:
>>>>
>>>> D:\Projects\svn\httpd-trunk\server>svn diff
>>>> Index: protocol.c
>>>> ===================================================================
>>>> --- protocol.c (revision 1701142)
>>>> +++ protocol.c (working copy)
>>>> @@ -1981,10 +1981,10 @@
>>>> server_rec *s,
>>>> apr_array_header_t
>>>> *choices)
>>>> {
>>>> + apr_array_header_t *proposals;
>>>> apr_pool_t *pool = r? r->pool : c->pool;
>>>> core_server_config *conf =
>>>> ap_get_core_module_config(s->module_config);
>>>> const char *protocol = NULL, *existing = ap_get_protocol(c);;
>>>> - apr_array_header_t *proposals;
>>
>> Hm, aren't there other/many places in the httpd code where non
>> initialized variables are declared after the initialized ones?
>>
> I am hoping my compiler is at least consistent!
> Not sure of what the rules are well enough to be an expert. I know
> Windows can be as pedantic as mine. See if Gregg asks for a similar
> change first, just to be sure.
> Norm
No it does not build on VC9 as is.
.\server\protocol.c(1987) : error C2143: syntax error : missing ';'
before 'type'
.\server\protocol.c(1998) : error C2065: 'proposals' : undeclared identifier
But fresh eyes see the ;; on the end of line 1986
const char *protocol = NULL, *existing = ap_get_protocol(c);;
Why this trips our compilers I have no idea but one ; should be sufficient.
fixed in r1701165
Re: r1701005 httpd-trunk\server\protocols.c
Posted by NormW <no...@gknw.net>.
On 4/09/2015 9:05 AM, Yann Ylavic wrote:
> On Fri, Sep 4, 2015 at 12:52 AM, NormW <no...@gknw.net> wrote:
>> Hi again,
>> Pushing passed previous problem, now arrive at:
>>>
>>> D:\Projects\svn\httpd-trunk\server>svn diff
>>> Index: protocol.c
>>> ===================================================================
>>> --- protocol.c (revision 1701142)
>>> +++ protocol.c (working copy)
>>> @@ -1981,10 +1981,10 @@
>>> server_rec *s,
>>> apr_array_header_t *choices)
>>> {
>>> + apr_array_header_t *proposals;
>>> apr_pool_t *pool = r? r->pool : c->pool;
>>> core_server_config *conf =
>>> ap_get_core_module_config(s->module_config);
>>> const char *protocol = NULL, *existing = ap_get_protocol(c);;
>>> - apr_array_header_t *proposals;
>
> Hm, aren't there other/many places in the httpd code where non
> initialized variables are declared after the initialized ones?
>
I am hoping my compiler is at least consistent!
Not sure of what the rules are well enough to be an expert. I know
Windows can be as pedantic as mine. See if Gregg asks for a similar
change first, just to be sure.
Norm
Re: r1701005 httpd-trunk\server\protocols.c
Posted by Yann Ylavic <yl...@gmail.com>.
On Fri, Sep 4, 2015 at 12:52 AM, NormW <no...@gknw.net> wrote:
> Hi again,
> Pushing passed previous problem, now arrive at:
>>
>> D:\Projects\svn\httpd-trunk\server>svn diff
>> Index: protocol.c
>> ===================================================================
>> --- protocol.c (revision 1701142)
>> +++ protocol.c (working copy)
>> @@ -1981,10 +1981,10 @@
>> server_rec *s,
>> apr_array_header_t *choices)
>> {
>> + apr_array_header_t *proposals;
>> apr_pool_t *pool = r? r->pool : c->pool;
>> core_server_config *conf =
>> ap_get_core_module_config(s->module_config);
>> const char *protocol = NULL, *existing = ap_get_protocol(c);;
>> - apr_array_header_t *proposals;
Hm, aren't there other/many places in the httpd code where non
initialized variables are declared after the initialized ones?