From nobody Sat Nov 2 14:30:34 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1486718771066215.81818847302804; Fri, 10 Feb 2017 01:26:11 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 8B22A82080; Fri, 10 Feb 2017 01:26:08 -0800 (PST) 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 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 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,140,1484035200"; d="scan'208";a="63070698" From: Yonghong Zhu To: edk2-devel@lists.01.org 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: [edk2] [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: , Cc: Nikolai SAOUKH MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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/So= urce/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; =20 - if (mStringFileName =3D=3D '\0' ) { + if (mStringFileName =3D=3D NULL || *mStringFileName =3D=3D '\0' ) { return NULL; } =20 if ((pInFile =3D fopen (LongFilePath (mStringFileName), "rb")) =3D=3D NU= LL) { return NULL; --=20 2.6.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel