Re: gcc warnings

Michel Van den Bergh <[email protected]>
Newsgroups gmane.comp.gnu.xboard.devel
Message-ID <[email protected]>
Yep it does like a bug. I am afraid I am to blame for this....
It is remarkable that this never seems to have given any issues.

Michel


On 04/16/2012 09:24 PM, Byrial Jensen wrote:
> Den 16-04-2012 19:18, [email protected] skrev:
>
>>   book.c: In function 'entry_from_file':
>>   book.c:391:19: warning: 'r' may be used uninitialized in this function [-Wuninitialized]
>>   book.c:400:12: note: 'r' was declared here
>
>
>   >  The one in book.c is a red herring: a pointer to the variable is
> passed to a routine that initializes it,
>   >  but the compiler cannot see that. The warning can be safely
> suppressed by just declaring as r=0.
>
> It sure looks like a genuine bug to me. The variable r is declared in
> function entry_from_file() line 400, and is never initialized before it
> is used in function int_from_file() line 391. Just like gcc says - it
> indeed does some interprocedural analysis.
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.