From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web09.2589.1580718059646798406 for ; Mon, 03 Feb 2020 00:20:59 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: liming.gao@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Feb 2020 00:20:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,397,1574150400"; d="scan'208";a="225102043" Received: from lgao4-mobl.ccr.corp.intel.com ([10.255.28.202]) by fmsmga008.fm.intel.com with ESMTP; 03 Feb 2020 00:20:58 -0800 From: "Liming Gao" To: devel@edk2.groups.io Cc: Zhiguang Liu Subject: [Patch] MdePkg Base.h: Use correct style to check macro _MSC_VER value Date: Mon, 3 Feb 2020 16:20:48 +0800 Message-Id: <20200203082048.77-1-liming.gao@intel.com> X-Mailer: git-send-email 2.24.1.windows.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Signed-off-by: Zhiguang Liu Reviewed-by: Liming Gao --- MdePkg/Include/Base.h | 2 +- MdePkg/Include/Ia32/ProcessorBind.h | 2 +- MdePkg/Include/X64/ProcessorBind.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index 321d729c04..8e5c7b0a00 100644 --- a/MdePkg/Include/Base.h +++ b/MdePkg/Include/Base.h @@ -33,7 +33,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // if the /OPT:REF linker option is used. We defined a macro as this is a // a non standard extension // -#if defined(_MSC_EXTENSIONS) && _MSC_VER < 1800 && !defined (MDE_CPU_EBC) +#if defined(_MSC_VER) && _MSC_VER < 1800 && !defined (MDE_CPU_EBC) /// /// Remove global variable from the linked image if there are no references to /// it after all compiler and linker optimizations have been performed. diff --git a/MdePkg/Include/Ia32/ProcessorBind.h b/MdePkg/Include/Ia32/ProcessorBind.h index fa4b7e8e98..9380380e57 100644 --- a/MdePkg/Include/Ia32/ProcessorBind.h +++ b/MdePkg/Include/Ia32/ProcessorBind.h @@ -87,7 +87,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // #pragma warning ( disable : 4206 ) -#if _MSC_VER == 1800 || _MSC_VER == 1900 || _MSC_VER >= 1910 +#if defined(_MSC_VER) && _MSC_VER >= 1800 // // Disable these warnings for VS2013. diff --git a/MdePkg/Include/X64/ProcessorBind.h b/MdePkg/Include/X64/ProcessorBind.h index 387e9c5c9c..5d14316524 100644 --- a/MdePkg/Include/X64/ProcessorBind.h +++ b/MdePkg/Include/X64/ProcessorBind.h @@ -101,7 +101,7 @@ // #pragma warning ( disable : 4206 ) -#if _MSC_VER == 1800 || _MSC_VER == 1900 || _MSC_VER >= 1910 +#if defined(_MSC_VER) && _MSC_VER >= 1800 // // Disable these warnings for VS2013. -- 2.24.1.windows.2