From: Nick Lewycky Date: Wed, 15 Sep 2010 18:35:19 +0000 (+0000) Subject: Initialize TypeOrExpr to NULL to silence a false-positive uninitialized warning X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=304b752a450c0fc5968c20ba25446d0bb7c6f68d;p=clang Initialize TypeOrExpr to NULL to silence a false-positive uninitialized warning from certain GCC's. Patch by Neil Vachharajani! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113995 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp index c29c618b01..46870d9528 100644 --- a/lib/Parse/ParseObjc.cpp +++ b/lib/Parse/ParseObjc.cpp @@ -1898,7 +1898,7 @@ ExprResult Parser::ParseObjCMessageExpression() { // Parse the receiver, which is either a type or an expression. bool IsExpr; - void *TypeOrExpr; + void *TypeOrExpr = NULL; if (ParseObjCXXMessageReceiver(IsExpr, TypeOrExpr)) { SkipUntil(tok::r_square); return ExprError();