xboard-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XBoard-devel] gcc warnings


From: Michel Van den Bergh
Subject: Re: [XBoard-devel] gcc warnings
Date: Mon, 16 Apr 2012 21:35:52 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101028 Thunderbird/3.1.6

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, address@hidden 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.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]