[cfe-commits] r96085 - /cfe/trunk/lib/Sema/SemaInit.cpp

Chandler Carruth chandlerc at gmail.com
Fri Feb 12 23:23:01 PST 2010


Author: chandlerc
Date: Sat Feb 13 01:23:01 2010
New Revision: 96085

URL: http://llvm.org/viewvc/llvm-project?rev=96085&view=rev
Log:
Silence a GCC warning about a possibly uninitialized variable. It's data flow
only flows so far it seems.

Modified:
    cfe/trunk/lib/Sema/SemaInit.cpp

Modified: cfe/trunk/lib/Sema/SemaInit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaInit.cpp?rev=96085&r1=96084&r2=96085&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaInit.cpp (original)
+++ cfe/trunk/lib/Sema/SemaInit.cpp Sat Feb 13 01:23:01 2010
@@ -744,7 +744,7 @@
       SemaRef.PerformCopyInitialization(Entity, expr->getLocStart(),
                                         SemaRef.Owned(expr));
 
-    Expr *ResultExpr;
+    Expr *ResultExpr = 0;
 
     if (Result.isInvalid())
       hadError = true; // types weren't compatible.





More information about the cfe-commits mailing list