From 9ff029993543e1258d83cdba75e70e21c60f432c Mon Sep 17 00:00:00 2001 From: Jordy Rose Date: Wed, 24 Aug 2011 20:38:42 +0000 Subject: [analyzer] Silence an (incorrect) uninitialized variable warning, caught by Cameron. llvm-svn: 138477 --- clang/lib/StaticAnalyzer/Core/CFRefCount.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/StaticAnalyzer/Core/CFRefCount.cpp') diff --git a/clang/lib/StaticAnalyzer/Core/CFRefCount.cpp b/clang/lib/StaticAnalyzer/Core/CFRefCount.cpp index 25ec74ee444..9f48b6c6bbe 100644 --- a/clang/lib/StaticAnalyzer/Core/CFRefCount.cpp +++ b/clang/lib/StaticAnalyzer/Core/CFRefCount.cpp @@ -1923,7 +1923,7 @@ namespace { } // 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 @@ void CFRefReport::addGCModeDescription(const CFRefCount &TF) { } } + assert(GCModeDescription && "invalid/unknown GC mode"); addExtraText(GCModeDescription); } -- cgit v1.2.3