On Jul 10, 2009, at 8:21 PM, Ted Kremenek wrote: > 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. >
Looks good. Thanks! snaroff > 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(); > > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
