From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web09.4112.1579146494866144524 for ; Wed, 15 Jan 2020 19:48:15 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: liming.gao@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jan 2020 19:48:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,324,1574150400"; d="scan'208";a="218383377" Received: from lgao4-mobl.ccr.corp.intel.com ([10.255.31.229]) by orsmga008.jf.intel.com with ESMTP; 15 Jan 2020 19:48:13 -0800 From: "Liming Gao" To: devel@edk2.groups.io Cc: Zhiguang Liu Subject: [Patch] MdePkg Base.h: Use correct style to check the defined macro Date: Thu, 16 Jan 2020 11:48:05 +0800 Message-Id: <20200116034805.1560-1-liming.gao@intel.com> X-Mailer: git-send-email 2.24.1.windows.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit #if MACRO is not good style. It should be changed to #ifdef MACRO style or #if defined (MACRO) style. Signed-off-by: Zhiguang Liu Reviewed-by: Liming Gao --- MdePkg/Include/Base.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index e0bcd0ae67..321d729c04 100644 --- a/MdePkg/Include/Base.h +++ b/MdePkg/Include/Base.h @@ -195,7 +195,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// #define ASM_PFX(name) _CONCATENATE (__USER_LABEL_PREFIX__, name) -#if __APPLE__ +#ifdef __APPLE__ // // Apple extension that is used by the linker to optimize code size // with assembly functions. Put at the end of your .S files @@ -799,7 +799,7 @@ typedef UINTN *BASE_LIST; **/ #ifdef MDE_CPU_EBC #define STATIC_ASSERT(Expression, Message) -#elif _MSC_EXTENSIONS +#elif defined(_MSC_EXTENSIONS) #define STATIC_ASSERT static_assert #else #define STATIC_ASSERT _Static_assert -- 2.24.1.windows.2