summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-03-15 07:58:36 +0000
committerTed Kremenek <kremenek@apple.com>2008-03-15 07:58:36 +0000
commit0d579b1c1e2ecdb4ba84668a1997ec0df3bb6b0c (patch)
tree798046ea0429b0154934b1ed5be911437df9e02c
parentcab47bdb378d3d17a4910bfde659ad0eb3c89285 (diff)
downloadbcm5719-llvm-0d579b1c1e2ecdb4ba84668a1997ec0df3bb6b0c.tar.gz
bcm5719-llvm-0d579b1c1e2ecdb4ba84668a1997ec0df3bb6b0c.zip
Added initialization to ErrorDiag to silence gcc's warning of the variable
potentially being used uninitialized (which it cannot be). llvm-svn: 48393
-rw-r--r--clang/Analysis/GRSimpleVals.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/Analysis/GRSimpleVals.cpp b/clang/Analysis/GRSimpleVals.cpp
index 44429336a54..3777d53bf0b 100644
--- a/clang/Analysis/GRSimpleVals.cpp
+++ b/clang/Analysis/GRSimpleVals.cpp
@@ -74,7 +74,7 @@ void EmitWarning(Diagnostic& Diag, SourceManager& SrcMgr,
msg = Out.str().c_str();
bool isFirst = true;
- unsigned ErrorDiag;
+ unsigned ErrorDiag = 0;
llvm::SmallPtrSet<void*,10> CachedErrors;
for (; I != E; ++I) {
OpenPOWER on IntegriCloud