This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa] Unused variable warnings


In message <20031017193025.GO6212@kam.mff.cuni.cz>, Jan Hubicka writes:
 >OK,
 >I have one problem.  It is a warning:
 >../../gcc/haifa-sched.c:2042: warning: 'index' might be used uninitialized in
 > this function
 >
 >index is initialized by:
 >if (max_issue (ready, &index) == 0)
 > 
 >where max_issue is function that really has path throught that really
 >does not write into the index variable, so this warning is de-facto
 >right, just not obvious.  What do we want to do here?
If there's really a path were index is uninitialized, then clearly we
want to initialize it to a safe value, both for the branch and the
mainline.

 >Shall I simply add initializer to this variable and another one in
 >f/lex.c as we do in usual case of this warning?
If f/lex.c also has a real path where the variable is uninitialized, yes
(and again, the same patch probably belongs on the mainline).

jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]