[cfe-commits] r138477 - /cfe/trunk/lib/StaticAnalyzer/Core/CFRefCount.cpp
Jordy Rose
jediknil at belkadan.com
Wed Aug 24 13:38:43 PDT 2011
Author: jrose
Date: Wed Aug 24 15:38:42 2011
New Revision: 138477
URL: http://llvm.org/viewvc/llvm-project?rev=138477&view=rev
Log:
[analyzer] Silence an (incorrect) uninitialized variable warning, caught by Cameron.
Modified:
cfe/trunk/lib/StaticAnalyzer/Core/CFRefCount.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Core/CFRefCount.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/CFRefCount.cpp?rev=138477&r1=138476&r2=138477&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/CFRefCount.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/CFRefCount.cpp Wed Aug 24 15:38:42 2011
@@ -1923,7 +1923,7 @@
} // end anonymous namespace
void CFRefReport::addGCModeDescription(const CFRefCount &TF) {
- const char *GCModeDescription;
+ const char *GCModeDescription = 0;
switch (TF.getLangOptions().getGCMode()) {
case LangOptions::GCOnly:
@@ -1950,6 +1950,7 @@
}
}
+ assert(GCModeDescription && "invalid/unknown GC mode");
addExtraText(GCModeDescription);
}
More information about the cfe-commits
mailing list