[cfe-commits] r138475 - /cfe/trunk/lib/Lex/TokenLexer.cpp
Argyrios Kyrtzidis
akyrtzi at gmail.com
Wed Aug 24 13:33:05 PDT 2011
Author: akirtzidis
Date: Wed Aug 24 15:33:05 2011
New Revision: 138475
URL: http://llvm.org/viewvc/llvm-project?rev=138475&view=rev
Log:
Silence 'may be used uninitialized' warnings.
Modified:
cfe/trunk/lib/Lex/TokenLexer.cpp
Modified: cfe/trunk/lib/Lex/TokenLexer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/TokenLexer.cpp?rev=138475&r1=138474&r2=138475&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/TokenLexer.cpp (original)
+++ cfe/trunk/lib/Lex/TokenLexer.cpp Wed Aug 24 15:33:05 2011
@@ -698,7 +698,7 @@
// 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 @@
// 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));
}
More information about the cfe-commits
mailing list