From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D0BCF8207E for ; Fri, 10 Feb 2017 01:26:06 -0800 (PST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP; 10 Feb 2017 01:26:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,140,1484035200"; d="scan'208";a="63070698" Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.121]) by orsmga005.jf.intel.com with ESMTP; 10 Feb 2017 01:26:05 -0800 From: Yonghong Zhu To: edk2-devel@lists.01.org Cc: Nikolai SAOUKH Date: Fri, 10 Feb 2017 17:26:03 +0800 Message-Id: <1486718763-4596-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [Patch] BaseTools: NULL pointer comparison to a char literal should be to NULL X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Feb 2017 09:26:07 -0000 From: Nikolai SAOUKH GCC7 complaint -- error: ISO C++ forbids comparison between pointer and integer. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Nikolai SAOUKH Reviewed-by: Yonghong Zhu --- BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp b/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp index 3ca57ed..b81fc7b 100644 --- a/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp +++ b/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp @@ -3370,11 +3370,11 @@ CVfrStringDB::GetVarStoreNameFormStringId ( EFI_STATUS Status; CHAR8 LineBuf[EFI_IFR_MAX_LENGTH]; UINT8 BlockType; EFI_HII_STRING_PACKAGE_HDR *PkgHeader; - if (mStringFileName == '\0' ) { + if (mStringFileName == NULL || *mStringFileName == '\0' ) { return NULL; } if ((pInFile = fopen (LongFilePath (mStringFileName), "rb")) == NULL) { return NULL; -- 2.6.1.windows.1