]> granicus.if.org Git - clang/commitdiff
Added initialization to ErrorDiag to silence gcc's warning of the variable
authorTed Kremenek <kremenek@apple.com>
Sat, 15 Mar 2008 07:58:36 +0000 (07:58 +0000)
committerTed Kremenek <kremenek@apple.com>
Sat, 15 Mar 2008 07:58:36 +0000 (07:58 +0000)
potentially being used uninitialized (which it cannot be).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48393 91177308-0d34-0410-b5e6-96231b3b80d8

Analysis/GRSimpleVals.cpp

index 44429336a54e5a27bbfde14b2c9265d45ccf0736..3777d53bf0b1c5ef9a4c96e28e06d58fb38aade4 100644 (file)
@@ -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) {