You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Graham Leggett <mi...@sharp.fm> on 2011/11/29 22:44:26 UTC

mod_xml2enc: warning: variable 'rv' set but not used

Hi all,

I've noticed some warnings in mod_xml2enc:

mod_xml2enc.c: In function 'fix_skipto':
mod_xml2enc.c:123:18: warning: variable 'rv' set but not used [-Wunused-but-set-variable]
mod_xml2enc.c: In function 'sniff_encoding':
mod_xml2enc.c:167:18: warning: variable 'rv' set but not used [-Wunused-but-set-variable]

Should we be handling the errors here?

                    rv = apr_brigade_partition(ctx->bbsave, (p-ctx->buf),
                                               &bstart);

Regards,
Graham
--


Re: mod_xml2enc: warning: variable 'rv' set but not used

Posted by Stefan Fritsch <sf...@sfritsch.de>.
On Tuesday 29 November 2011, Graham Leggett wrote:
> Hi all,
> 
> I've noticed some warnings in mod_xml2enc:
> 
> mod_xml2enc.c: In function 'fix_skipto':
> mod_xml2enc.c:123:18: warning: variable 'rv' set but not used
> [-Wunused-but-set-variable] mod_xml2enc.c: In function
> 'sniff_encoding':
> mod_xml2enc.c:167:18: warning: variable 'rv' set but not used
> [-Wunused-but-set-variable]
> 
> Should we be handling the errors here?
> 
>                     rv = apr_brigade_partition(ctx->bbsave,
> (p-ctx->buf), &bstart);

These are fixed in trunk r1206850. I intend to backport to 2.4. But if 
you have some time, a second set of eyeballs can't hurt.