[llvm-commits] [llvm] r79946 - /llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp

Scott Michel scottm at aero.org
Mon Aug 24 14:53:27 PDT 2009


Author: pingbak
Date: Mon Aug 24 16:53:27 2009
New Revision: 79946

URL: http://llvm.org/viewvc/llvm-project?rev=79946&view=rev
Log:
Initialize ShufBytes, as gcc 4.4 can't detect that the entire array is
initialized and a warning about a potentially unintialized variable is
generated.

Modified:
    llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp

Modified: llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp?rev=79946&r1=79945&r2=79946&view=diff

==============================================================================
--- llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp Mon Aug 24 16:53:27 2009
@@ -1963,7 +1963,9 @@
     assert(prefslot_begin != -1 && prefslot_end != -1 &&
            "LowerEXTRACT_VECTOR_ELT: preferred slots uninitialized");
 
-    unsigned int ShufBytes[16];
+    unsigned int ShufBytes[16] = {
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+    };
     for (int i = 0; i < 16; ++i) {
       // zero fill uppper part of preferred slot, don't care about the
       // other slots:





More information about the llvm-commits mailing list