diff options
author | David Blaikie <dblaikie@gmail.com> | 2016-05-03 22:14:14 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2016-05-03 22:14:14 +0000 |
commit | 263942f59046d0e67f9d064b9f8f232cdce08467 (patch) | |
tree | 4484514d210a7afd9eba48d15a588e0d6f78b4f7 /clang/tools/c-index-test/c-index-test.c | |
parent | d0d2341f30ef9929ae6bd9a53605548b78424fae (diff) | |
download | bcm5719-llvm-263942f59046d0e67f9d064b9f8f232cdce08467.tar.gz bcm5719-llvm-263942f59046d0e67f9d064b9f8f232cdce08467.zip |
[scan-build] fix dead store warnings emitted on clang code base
This fixes dead store warnings of the type "dead assignment" reported
by CLang Static Analyzer on the following file:
- tools/c-index-test/c-index-test.c.
Patch by Apelete Seketeli <apelete@seketeli.net>!
Differential Revision: http://reviews.llvm.org/D19831
llvm-svn: 268453
Diffstat (limited to 'clang/tools/c-index-test/c-index-test.c')
-rw-r--r-- | clang/tools/c-index-test/c-index-test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c index d0fe84aa08a..802140a350f 100644 --- a/clang/tools/c-index-test/c-index-test.c +++ b/clang/tools/c-index-test/c-index-test.c @@ -1432,10 +1432,10 @@ static enum CXChildVisitResult PrintTypeSize(CXCursor cursor, CXCursor p, CXString FieldSpelling = clang_getCursorSpelling(cursor); const char *FieldName = clang_getCString(FieldSpelling); /* recurse to get the first parent record that is not anonymous. */ - CXCursor Parent, Record; unsigned RecordIsAnonymous = 0; if (clang_getCursorKind(cursor) == CXCursor_FieldDecl) { - Record = Parent = p; + CXCursor Record; + CXCursor Parent = p; do { Record = Parent; Parent = clang_getCursorSemanticParent(Record); |