[PATCH] Fixing warnings revealed by gcc release build

Edwin Vane edwin.vane at intel.com
Tue Jan 29 09:04:01 PST 2013


    * Removing fixes for used-uninitialized warnings
    * Moved computation into DEBUG() to avoid set-but-not-used warning

Hi gribozavr,

http://llvm-reviews.chandlerc.com/D341

CHANGE SINCE LAST DIFF
  http://llvm-reviews.chandlerc.com/D341?vs=801&id=807#toc

Files:
  lib/CodeGen/StackColoring.cpp
  lib/Transforms/Instrumentation/MemorySanitizer.cpp
  lib/Transforms/Scalar/SROA.cpp

Index: lib/CodeGen/StackColoring.cpp
===================================================================
--- lib/CodeGen/StackColoring.cpp
+++ lib/CodeGen/StackColoring.cpp
@@ -202,9 +202,7 @@
 void StackColoring::dump() {
   for (df_iterator<MachineFunction*> FI = df_begin(MF), FE = df_end(MF);
        FI != FE; ++FI) {
-    unsigned Num = BasicBlocks[*FI];
-    DEBUG(dbgs()<<"Inspecting block #"<<Num<<" ["<<FI->getName()<<"]\n");
-    Num = 0;
+    DEBUG(dbgs()<<"Inspecting block #"<<BasicBlocks[*FI]<<" ["<<FI->getName()<<"]\n");
     DEBUG(dbgs()<<"BEGIN  : {");
     for (unsigned i=0; i < BlockLiveness[*FI].Begin.size(); ++i)
       DEBUG(dbgs()<<BlockLiveness[*FI].Begin.test(i)<<" ");
Index: lib/Transforms/Instrumentation/MemorySanitizer.cpp
===================================================================
--- lib/Transforms/Instrumentation/MemorySanitizer.cpp
+++ lib/Transforms/Instrumentation/MemorySanitizer.cpp
@@ -1594,6 +1594,7 @@
       if (MS.TrackOrigins)
         IRB.CreateStore(getOrigin(A),
                         getOriginPtrForArgument(A, IRB, ArgOffset));
+      (void)Store;
       assert(Size != 0 && Store != 0);
       DEBUG(dbgs() << "  Param:" << *Store << "\n");
       ArgOffset += DataLayout::RoundUpAlignment(Size, 8);
Index: lib/Transforms/Scalar/SROA.cpp
===================================================================
--- lib/Transforms/Scalar/SROA.cpp
+++ lib/Transforms/Scalar/SROA.cpp
@@ -2971,6 +2971,7 @@
     else
       New = IRB.CreateLifetimeEnd(Ptr, Size);
 
+    (void)New;
     DEBUG(dbgs() << "          to: " << *New << "\n");
     return true;
   }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D341.2.patch
Type: text/x-patch
Size: 1619 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130129/aa612963/attachment.bin>


More information about the llvm-commits mailing list