[cfe-commits] r107745 - /cfe/trunk/lib/Checker/IdempotentOperationChecker.cpp

Chandler Carruth chandlerc at gmail.com
Tue Jul 6 17:36:56 PDT 2010


Author: chandlerc
Date: Tue Jul  6 19:36:56 2010
New Revision: 107745

URL: http://llvm.org/viewvc/llvm-project?rev=107745&view=rev
Log:
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.

Modified:
    cfe/trunk/lib/Checker/IdempotentOperationChecker.cpp

Modified: cfe/trunk/lib/Checker/IdempotentOperationChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/IdempotentOperationChecker.cpp?rev=107745&r1=107744&r2=107745&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/IdempotentOperationChecker.cpp (original)
+++ cfe/trunk/lib/Checker/IdempotentOperationChecker.cpp Tue Jul  6 19:36:56 2010
@@ -311,7 +311,7 @@
       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";





More information about the cfe-commits mailing list