aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-07-11 00:21:48 +0000
committerTed Kremenek <kremenek@apple.com>2009-07-11 00:21:48 +0000
commit496e89f8d55f7a931c246e820c10f7296a246ac2 (patch)
treedb5459c06ab041c0df0cf2d56c3d203c753b1d3a
parent7d7c4395df80fbf431396509c54ffb3e02884041 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75321 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Sema/SemaExpr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 8611fd5461..058bda4d10 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -3832,8 +3832,8 @@ inline QualType Sema::CheckAdditionOperands( // C99 6.5.6
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();