From: Chandler Carruth Date: Wed, 7 Jul 2010 00:36:56 +0000 (+0000) Subject: Silence an annoying GCC warning about use of an uninitialized variable. Even X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=12080d40d567bd4730f1dedbbe9510e50151d8ba;p=clang Silence an annoying GCC warning about use of an uninitialized variable. Even making the other switch case unreachable, or sinking the 'continue' into it doesn't silence this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107745 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Checker/IdempotentOperationChecker.cpp b/lib/Checker/IdempotentOperationChecker.cpp index 1118d5e279..646c6aff1f 100644 --- a/lib/Checker/IdempotentOperationChecker.cpp +++ b/lib/Checker/IdempotentOperationChecker.cpp @@ -311,7 +311,7 @@ void IdempotentOperationChecker::VisitEndAnalysis(ExplodedGraph &G, hash.begin(); i != hash.end(); ++i) { if (i->second != Impossible) { // Select the error message. - const char *msg; + const char *msg = 0; switch (i->second) { case Equal: msg = "idempotent operation; both operands are always equal in value";