Initialize ShufBytes, as gcc 4.4 can't detect that the entire array is
authorScott Michel <scottm@aero.org>
Mon, 24 Aug 2009 21:53:27 +0000 (21:53 +0000)
committerScott Michel <scottm@aero.org>
Mon, 24 Aug 2009 21:53:27 +0000 (21:53 +0000)
initialized and a warning about a potentially unintialized variable is
generated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79946 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/CellSPU/SPUISelLowering.cpp

index d0723dc42126cad995c77a6891af25aec6f1a648..e8b5ae6123cc4402761d0132e389f62640aab274 100644 (file)
@@ -1963,7 +1963,9 @@ static SDValue LowerEXTRACT_VECTOR_ELT(SDValue Op, SelectionDAG &DAG) {
     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: