From: Duncan Sands Date: Sat, 9 Jun 2012 10:04:03 +0000 (+0000) Subject: Silence a gcc-4.6 warning: GCC fails to understand that secondReg and cmpOp2 are X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=af0d459e36cd96005898cf0800d151845311f471;p=oota-llvm.git Silence a gcc-4.6 warning: GCC fails to understand that secondReg and cmpOp2 are correlated, and thinks that cmpOp2 may be used uninitialized. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158263 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/Hexagon/HexagonNewValueJump.cpp b/lib/Target/Hexagon/HexagonNewValueJump.cpp index c93b56debe5..7ece4085ecb 100644 --- a/lib/Target/Hexagon/HexagonNewValueJump.cpp +++ b/lib/Target/Hexagon/HexagonNewValueJump.cpp @@ -222,7 +222,7 @@ static bool canCompareBeNewValueJump(const HexagonInstrInfo *QII, return false; } - unsigned cmpReg1, cmpOp2; + unsigned cmpReg1, cmpOp2 = 0; // cmpOp2 assignment silences compiler warning. cmpReg1 = MI->getOperand(1).getReg(); if (secondReg) {