From 4a1270691e28fb10e2804f062c9f74fd38d1667c Mon Sep 17 00:00:00 2001 From: Axel Naumann Date: Mon, 17 Sep 2012 14:20:57 +0000 Subject: Fix a few vars that can end up being used without initialization. The cases where no initialization happens should still be checked for logic flaws. llvm-svn: 164032 --- llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | 2 +- llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Transforms') diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp index 0775cf4a224..afa6a4b5e67 100644 --- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -392,7 +392,7 @@ bool AddressSanitizer::HasDynamicInitializer(GlobalVariable *G) { } void AddressSanitizer::instrumentMop(AsanFunctionContext &AFC, Instruction *I) { - bool IsWrite; + bool IsWrite = false; Value *Addr = isInterestingMemoryAccess(I, &IsWrite); assert(Addr); if (ClOpt && ClOptGlobals) { diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index e7b5bc779a3..091d63d67db 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -1796,7 +1796,7 @@ bool llvm::FoldBranchToCommonDest(BranchInst *BI) { continue; // Determine if the two branches share a common destination. - Instruction::BinaryOps Opc; + Instruction::BinaryOps Opc = Instruction::BinaryOpsEnd; bool InvertPredCond = false; if (BI->isConditional()) { -- cgit v1.2.3