<<< Date Index >>>     <<< Thread Index >>>

Re: Little code cleanup



On 2008-03-03 10:45:39 +0100, Thomas Roessler wrote:
> On 2008-03-03 08:40:36 +0100, Sébastien Hinderer wrote:
> > ../hg/compose.c: In function 'mutt_compose_menu':
> > ../hg/compose.c:1210: warning: the address of 'fname' will always evaluate 
> > as 'true'
> > ../hg/mx.c: In function 'mx_close_mailbox':
> > ../hg/mx.c:859: warning: the address of 'mbox' will always evaluate as 
> > 'true'
> > 
> > The patch below fixes them.
> > 
> > Sébastien.
> 
> From a quick look, the warnings are actually mistaken, and the patch
> shouldn't be applied.

I agree. Concerning these two warnings (due to the fact that a pointer
to the first element of an array is never null), we have a similar
problem in MPFR. I think that can be regarded as a bug in gcc.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)