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

patch: Preinitializing of local variable


Hallo all,

I found a may uninitialized local variable in function 
expand_builtin_strcmp.

Patch:

--- gcc/builtins.c      (revision 120611)
+++ gcc/builtins.c      (working copy)
@@ -3880,7 +3880,7 @@
       || cmpstrn_optab[SImode] != CODE_FOR_nothing)
     {
       rtx arg1_rtx, arg2_rtx;
-      rtx result, insn = NULL_RTX;
+      rtx result = NULL_RTX, insn = NULL_RTX;
       tree fndecl, fn;
 
       tree arg1 = TREE_VALUE (arglist);

ChangeLog:
2007-01-11  Kai Tietz   <kai.tietz@onevision.com>

        * gcc/builtins.c: (expand_builtin_strcmp) Initialize may not 
initialized local variable result by NULL_RTX

Best regards,
 i.A. Kai Tietz


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