[PATCH] D19831: [scan-build] fix dead store warnings emitted on clang code base

Apelete Seketeli via cfe-commits cfe-commits at lists.llvm.org
Mon May 2 13:36:24 PDT 2016


apelete created this revision.
apelete added a reviewer: akyrtzi.
apelete added a subscriber: cfe-commits.

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.

Signed-off-by: Apelete Seketeli <apelete at seketeli.net>

http://reviews.llvm.org/D19831

Files:
  tools/c-index-test/c-index-test.c

Index: tools/c-index-test/c-index-test.c
===================================================================
--- tools/c-index-test/c-index-test.c
+++ tools/c-index-test/c-index-test.c
@@ -1436,6 +1436,7 @@
     unsigned RecordIsAnonymous = 0;
     if (clang_getCursorKind(cursor) == CXCursor_FieldDecl) {
       Record = Parent = p;
+      (void) Record;
       do {
         Record = Parent;
         Parent = clang_getCursorSemanticParent(Record);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19831.55886.patch
Type: text/x-patch
Size: 451 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160502/e71ba918/attachment.bin>


More information about the cfe-commits mailing list