]> granicus.if.org Git - clang/commitdiff
Silence 'may be used uninitialized' warnings.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 24 Aug 2011 20:33:05 +0000 (20:33 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 24 Aug 2011 20:33:05 +0000 (20:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138475 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/TokenLexer.cpp

index 80f6ad14496a0004f31cbe548fadc6dc8d1ba040..a651f6c91aa110b09a5cc676f37ec93b46cbe16b 100644 (file)
@@ -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));
   }