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]: Fix warning in ipa-struct-reorg.c


Hello,

while testing bootstrap I found the warning
../../gcc/gcc/ipa-struct-reorg.c: In function ?create_new_acc?:
../../gcc/gcc/ipa-struct-reorg.c:1256: warning: ?rhs? may be used
uninitialized in this function

This patch fixes this warning

ChangeLog

2009-03-16  Kai Tietz  <kai.tietz@onevision.com>

	* ipa-struct-reorg.c (create_general_new_stmt): Initialize local
	variable rhs by NULL_TREE.

Is this patch ok to apply on trunk?

Cheers,
Kai
-- 
|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination

Index: gcc/gcc/ipa-struct-reorg.c
===================================================================
--- gcc.orig/gcc/ipa-struct-reorg.c
+++ gcc/gcc/ipa-struct-reorg.c
@@ -1253,7 +1253,7 @@ create_general_new_stmt (struct access_s
     {
       tree *pos;
       tree new_var = find_new_var_of_type (var, new_type);
-      tree lhs, rhs;
+      tree lhs, rhs = NULL_TREE;

       gcc_assert (new_var);
       finalize_var_creation (new_var);


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