diff options
author | Ted Kremenek <kremenek@apple.com> | 2012-09-16 06:18:45 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2012-09-16 06:18:45 +0000 |
commit | 536cebd7f81b665dbef2ad6f081dcb23349f5576 (patch) | |
tree | e3886760bd725978462fa8f4ccd672c42391a800 /lib/Lex/PTHLexer.cpp | |
parent | 72e4f25c067d44a9dbc70a0c8bb50120cded6a72 (diff) |
Fix dead store found by static analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163994 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PTHLexer.cpp')
-rw-r--r-- | lib/Lex/PTHLexer.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/Lex/PTHLexer.cpp b/lib/Lex/PTHLexer.cpp index bb6e73cc75..b1671721b6 100644 --- a/lib/Lex/PTHLexer.cpp +++ b/lib/Lex/PTHLexer.cpp @@ -198,12 +198,11 @@ bool PTHLexer::SkipBlock() { assert(LastHashTokPtr && "No known '#' token."); const unsigned char* HashEntryI = 0; - uint32_t Offset; uint32_t TableIdx; do { // Read the token offset from the side-table. - Offset = ReadLE32(CurPPCondPtr); + uint32_t Offset = ReadLE32(CurPPCondPtr); // Read the target table index from the side-table. TableIdx = ReadLE32(CurPPCondPtr); @@ -223,13 +222,11 @@ bool PTHLexer::SkipBlock() { PPCond + TableIdx*(sizeof(uint32_t)*2); assert(NextPPCondPtr >= CurPPCondPtr); // Read where we should jump to. - uint32_t TmpOffset = ReadLE32(NextPPCondPtr); - const unsigned char* HashEntryJ = TokBuf + TmpOffset; + const unsigned char* HashEntryJ = TokBuf + ReadLE32(NextPPCondPtr); if (HashEntryJ <= LastHashTokPtr) { // Jump directly to the next entry in the side table. HashEntryI = HashEntryJ; - Offset = TmpOffset; TableIdx = ReadLE32(NextPPCondPtr); CurPPCondPtr = NextPPCondPtr; } |