Skip to content

Commit a460aa1

Browse files
[Sema] Fix a warning
This patch fixes: clang/lib/Sema/AnalysisBasedWarnings.cpp:686:23: error: variable 'FD' set but not used [-Werror,-Wunused-but-set-variable]
1 parent ec150a9 commit a460aa1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Sema/AnalysisBasedWarnings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ static void CheckFallThroughForBody(Sema &S, const Decl *D, const Stmt *Body,
683683
} else if (!ReturnsVoid && CD.diag_FallThrough_ReturnsNonVoid) {
684684
// If the final statement is a call to an always-throwing function,
685685
// don't warn about the fall-through.
686-
if (const auto *FD = D->getAsFunction()) {
686+
if (D->getAsFunction()) {
687687
if (const auto *CS = dyn_cast<CompoundStmt>(Body);
688688
CS && !CS->body_empty()) {
689689
const Stmt *LastStmt = CS->body_back();

0 commit comments

Comments
 (0)