]> granicus.if.org Git - clang/commitdiff
Initialize a couple of variables to shut GCC up.
authorJohn McCall <rjmccall@apple.com>
Fri, 17 Jun 2011 06:50:50 +0000 (06:50 +0000)
committerJohn McCall <rjmccall@apple.com>
Fri, 17 Jun 2011 06:50:50 +0000 (06:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133246 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaExprObjC.cpp
lib/StaticAnalyzer/Core/CFRefCount.cpp

index 70eb2a3c72725c993f77ee1b036460071cc8e65d..5aff7347a6d7f5d6c8ee3d94ee015dbbeef74101 100644 (file)
@@ -1586,7 +1586,7 @@ Sema::CheckObjCARCConversion(SourceRange castRange, QualType castType,
                                     "converts between Objective-C and C pointers in -fobjc-arc"))
     return;
   
-  unsigned srcKind;
+  unsigned srcKind = 0;
   switch (exprACTC) {
     case ACTC_none:
       srcKind = (castExprType->isPointerType() ? 1 : 0);
index 33118fa901da350342f7a49feb61948416269afa..70646e9f8bd18fd7ece6e46469315065f18e7ce5 100644 (file)
@@ -3582,7 +3582,7 @@ void RetainReleaseChecker::checkPostStmt(const CastExpr *CE,
   if (!BE)
     return;
   
-  ArgEffect AE;
+  ArgEffect AE = IncRef;
   
   switch (BE->getBridgeKind()) {
     case clang::OBC_Bridge: