|
From: | Byrial Jensen |
Subject: | Re: [XBoard-devel] gcc warnings |
Date: | Mon, 16 Apr 2012 21:24:09 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20120411 Thunderbird/11.0.1 |
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.
[Prev in Thread] | Current Thread | [Next in Thread] |