[cfe-commits] r75321 - /cfe/trunk/lib/Sema/SemaExpr.cpp
Ted Kremenek
kremenek at apple.com
Fri Jul 10 17:21:49 PDT 2009
Author: kremenek
Date: Fri Jul 10 19:21:48 2009
New Revision: 75321
URL: http://llvm.org/viewvc/llvm-project?rev=75321&view=rev
Log:
Fix warning when compiling with optimizations:
warning: ‘OPT’ may be used uninitialized in this function
Now OPT is initialized to NULL. I'm not certain if this is the correct fix;
others please review.
Modified:
cfe/trunk/lib/Sema/SemaExpr.cpp
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=75321&r1=75320&r2=75321&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Fri Jul 10 19:21:48 2009
@@ -3832,8 +3832,8 @@
if (IExp->getType()->isIntegerType()) {
QualType PointeeTy;
- const PointerType *PTy;
- const ObjCObjectPointerType *OPT;
+ const PointerType *PTy = NULL;
+ const ObjCObjectPointerType *OPT = NULL;
if ((PTy = PExp->getType()->getAsPointerType()))
PointeeTy = PTy->getPointeeType();
More information about the cfe-commits
mailing list