Persuade GCC that there is nothing worth warning about here (there isn't).
authorDuncan Sands <baldrick@free.fr>
Sun, 5 Feb 2012 14:20:11 +0000 (14:20 +0000)
committerDuncan Sands <baldrick@free.fr>
Sun, 5 Feb 2012 14:20:11 +0000 (14:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149834 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/AliasAnalysisCounter.cpp
lib/CodeGen/MachineCSE.cpp
lib/Support/Mutex.cpp
lib/Target/ARM/ARMFastISel.cpp
lib/Target/X86/Disassembler/X86DisassemblerDecoder.c
lib/Target/X86/X86ISelLowering.cpp

index a7744c9b2dbd1458fbb916971712ad194f06e2df..9f219f563739aa7813c67fe7f62802989879f1a8 100644 (file)
@@ -127,7 +127,7 @@ AliasAnalysis::AliasResult
 AliasAnalysisCounter::alias(const Location &LocA, const Location &LocB) {
   AliasResult R = getAnalysis<AliasAnalysis>().alias(LocA, LocB);
 
-  const char *AliasString;
+  const char *AliasString = 0;
   switch (R) {
   case NoAlias:   No++;   AliasString = "No alias"; break;
   case MayAlias:  May++;  AliasString = "May alias"; break;
@@ -153,7 +153,7 @@ AliasAnalysisCounter::getModRefInfo(ImmutableCallSite CS,
                                     const Location &Loc) {
   ModRefResult R = getAnalysis<AliasAnalysis>().getModRefInfo(CS, Loc);
 
-  const char *MRString;
+  const char *MRString = 0;
   switch (R) {
   case NoModRef: NoMR++;     MRString = "NoModRef"; break;
   case Ref:      JustRef++;  MRString = "JustRef"; break;
index 0715f28ca13950d619740e217aef7660f77f5779..9d46aaab8dfa36def1f34996a95465fea1d46e8d 100644 (file)
@@ -255,6 +255,7 @@ bool MachineCSE::PhysRegDefsReach(MachineInstr *CSMI, MachineInstr *MI,
 
     if (I == EE) {
       assert(CrossMBB && "Reaching end-of-MBB without finding MI?");
+      (void)CrossMBB;
       CrossMBB = false;
       NonLocal = true;
       I = MBB->begin();
index e146b8b0ed16a83377d9e8fa461c4d1a5241eaa5..da5baab4be468bc73c1cce1d70b6f1b1aaeed71c 100644 (file)
@@ -51,7 +51,7 @@ MutexImpl::MutexImpl( bool recursive)
 
   // Initialize the mutex attributes
   int errorcode = pthread_mutexattr_init(&attr);
-  assert(errorcode == 0);
+  assert(errorcode == 0); (void)errorcode;
 
   // Initialize the mutex as a recursive mutex, if requested, or normal
   // otherwise.
index 63c516109e3597efa462b4e48da41d4d80433d43..79c447af2c625b99fb1e8a9459ac2c07cf2dba7c 100644 (file)
@@ -2279,6 +2279,7 @@ bool ARMFastISel::ARMTryEmitSmallMemCpy(Address Dest, Address Src, uint64_t Len)
     assert (RV == true && "Should be able to handle this load.");
     RV = ARMEmitStore(VT, ResultReg, Dest);
     assert (RV == true && "Should be able to handle this store.");
+    (void)RV;
 
     unsigned Size = VT.getSizeInBits()/8;
     Len -= Size;
index bb24d331317dc004f77162be4a9160e7cfc4e473..958f653eb736bc61313cb2c3d4e8320a59011752 100644 (file)
@@ -103,7 +103,7 @@ static InstrUID decode(OpcodeType type,
                        InstructionContext insnContext,
                        uint8_t opcode,
                        uint8_t modRM) {
-  const struct ModRMDecision* dec;
+  const struct ModRMDecision* dec = 0;
   
   switch (type) {
   case ONEBYTE:
index 7c3faca1db765885932aa05330d7bb26a28cf9bc..81396cca2e6c19be3c4abf6dd2c532c4b9540123 100644 (file)
@@ -8288,7 +8288,7 @@ SDValue X86TargetLowering::LowerVSETCC(SDValue Op, SelectionDAG &DAG) const {
   if (isFP) {
     unsigned SSECC = 8;
     EVT EltVT = Op0.getValueType().getVectorElementType();
-    assert(EltVT == MVT::f32 || EltVT == MVT::f64);
+    assert(EltVT == MVT::f32 || EltVT == MVT::f64); (void)EltVT;
 
     bool Swap = false;