GCC 4.4 warns that Receiver may be used uninitialized in this function.

As far as I can see, gcc is right to think this!  The following change
will cause a nice segfault rather than undefined behaviour if this case
occurs.  Someone who understands what this code is supposed to do should
probably take a proper look.

llvm-svn: 116917
This commit is contained in:
Duncan Sands 2010-10-20 08:21:16 +00:00
parent f551acaaf5
commit 3a02f3eeff
1 changed files with 1 additions and 1 deletions

View File

@ -1213,7 +1213,7 @@ Stmt *RewriteObjC::RewritePropertyOrImplicitSetter(BinaryOperator *BinOp, Expr *
ObjCMethodDecl *OMD = 0;
QualType Ty;
Selector Sel;
Stmt *Receiver;
Stmt *Receiver = 0;
bool Super = false;
QualType SuperTy;
SourceLocation SuperLocation;