|
From: Robert W. <rj...@du...> - 2004-09-28 17:30:05
|
> I'm using valgrind 2.2.0 for the first time, on a linux 2.6.7 system with > gcc 3.3.4. I have optimizations set to -O. However, I'm getting *many* > warnings about "Conditional jump or move depends on uninitialized value"... > some of these warnings are clearly spurious; a typical example is: > > result = get_number_of_luns(udev) ; > total_luns = (result <= 0) ? 1 : result ; // line 1449 > > ==25533== Conditional jump or move depends on uninitialised value(s) > ==25533== at 0x805AC84: find_dev_cap(unsigned) (imilib.cpp:1449) > > result is defined as int, and get_number_of_luns() returns int. So result > cannot be uninitialized here. > > I even tried removing optimization flags entirely, but it didn't change > these warnings. What, if anything, can I do to resolve these warnings and > get down to valid messages?? Check to see if get_number_of_luns is returning an initialized value. Valgrind won't report that on exit of get_number_of_luns, but it will pass the uninitialized value around and Valgrind will detect when it's used to make a decision. Try compiling it with -Wall to see if gcc spots anything. |