From: Argyrios Kyrtzidis Date: Wed, 24 Aug 2011 20:33:05 +0000 (+0000) Subject: Silence 'may be used uninitialized' warnings. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c4b5582908e743cc05782e5220546f27286be19b;p=clang Silence 'may be used uninitialized' warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138475 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Lex/TokenLexer.cpp b/lib/Lex/TokenLexer.cpp index 80f6ad1449..a651f6c91a 100644 --- a/lib/Lex/TokenLexer.cpp +++ b/lib/Lex/TokenLexer.cpp @@ -698,7 +698,7 @@ static void updateConsecutiveMacroArgTokens(SourceManager &SM, // For the consecutive tokens, find the length of the SLocEntry to contain // all of them. Token &LastConsecutiveTok = *(NextTok-1); - int LastRelOffs; + int LastRelOffs = 0; SM.isInSameSLocAddrSpace(FirstLoc, LastConsecutiveTok.getLocation(), &LastRelOffs); unsigned FullLength = LastRelOffs + LastConsecutiveTok.getLength(); @@ -711,7 +711,7 @@ static void updateConsecutiveMacroArgTokens(SourceManager &SM, // expanded location. for (; begin_tokens < NextTok; ++begin_tokens) { Token &Tok = *begin_tokens; - int RelOffs; + int RelOffs = 0; SM.isInSameSLocAddrSpace(FirstLoc, Tok.getLocation(), &RelOffs); Tok.setLocation(Expansion.getFileLocWithOffset(RelOffs)); }