This is the mail archive of the gcc-bugs@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]

uninitialized variables in gcc


Hi
I've tried to solve some of the 'might be used uninitialized in this function' error messages I got when compiling the cvs version of gcc, and I hope my suggestions are useful:

gcc/fixinc/fixincl.c:
656: a default value for 'res'
1054: maybe set 'pz_cmd_save' to NULL here to please gcc? (It isn't used at all, but error messages aren't nice..)

libf2c/libI77/inquire.c:
45: maybe set x to 0 (to make sure it isn't -1, which it's checked against somewhat later)

libjava/java/lang/e_exp.c:145/152:
The result is not defined if execution reaches the if statement on line 145 ( if(huge+x>one) return one+x; ), and the statement is false.
In other words: if !(hx > 0x3fd62e42) && (hx < 0x3e300000) && !(huge+x>one).
Under these conditions, the result depends on the unknown value of 'k'.

Are these suggestions useful, or can I better do something else? (I don't have very much experience with asm/c/c++/java..) If they are, I can try to solve more.

With regards,
Taco



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