Description of problem: I just tried to compile Fedora development package qt-3.3.5-2 with the extra compiler flag -Wall. The compiler said 3rdparty/opentype/ftxgdef.c:1084: warning: 'error' is used uninitialized in this function The source code is /* we don't accept glyphs covered in `GlyphClassDef' */ if ( !error ) return TTO_Err_Not_Covered; Suggest initialise local variable "error" before first use. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
which gcc version have you used here? I cannot reproduce it here with gcc-4.0.1-14. Taken a look at the source, the error is initialized before using if ( gdef->GlyphClassDef.loaded ) { error = Get_Class( &gdef->GlyphClassDef, glyphID, &klass, &index ); if ( error && error != TTO_Err_Not_Covered ) return error; } else { klass = 0; index = 0; } /* we don't accept glyphs covered in `GlyphClassDef' */ if ( !error ) return TTO_Err_Not_Covered;
>which gcc version have you used here? The one that is standard in FC4. I think it is gcc 4.0.0 >I cannot reproduce it here The error is obvious by visual inspection. Please try again. >the error is initialized before using Local variable "error" is only initialise under some, not all, execution paths. Suggest initialise "error" on _all_ execution paths.
Hm, by visual inspection the local variable "error" is always initialised here if condition gdef->GlyphClassDef.loaded is true! if ( gdef->GlyphClassDef.loaded ) { error = Get_Class( &gdef->GlyphClassDef, glyphID, &klass, &index );
>local variable "error" is always initialised What happens if gdef->GlyphClassDef.loaded is false ? I suggest again to have another look. Both I and the compiler think there are execution paths where "error" is not initialised.
yes, it's obviously that "error" is not initialised before using. Sorry i have been blind!
ok, it seems that this 3dparty code is not used by default. I have already sent the fix to trolltech for including in next upstream release. Thanks for your report.