From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=217.140.96.140; helo=cam-smtp0.cambridge.arm.com; envelope-from=sami.mujawar@arm.com; receiver=edk2-devel@lists.01.org Received: from cam-smtp0.cambridge.arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D880021B02845 for ; Wed, 27 Jun 2018 09:47:56 -0700 (PDT) Received: from E107187.Emea.Arm.com (E107187.Emea.Arm.com [10.1.206.129]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id w5RGlpOY009420; Wed, 27 Jun 2018 17:47:53 +0100 From: Sami Mujawar To: edk2-devel@lists.01.org Cc: leif.lindholm@linaro.org, evan.lloyd@arm.com, Matteo.Carlini@arm.com, Stephanie.Hughes-Fitt@arm.com, nd@arm.com Date: Wed, 27 Jun 2018 17:47:45 +0100 Message-Id: <20180627164746.36188-5-sami.mujawar@arm.com> X-Mailer: git-send-email 2.11.0.windows.3 In-Reply-To: <20180627164746.36188-1-sami.mujawar@arm.com> References: <20180627164746.36188-1-sami.mujawar@arm.com> Subject: [staging/dynamictables PATCH v1 4/5] DynamicTablesPkg: Fix macro to prevent side effect X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 16:47:57 -0000 The ALIGN32 macro had undesired side effects when used with binary operators and was generating compilation errors. Added brackets to fix this issue. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar --- Notes: v1: - Fix macro side effect [SAMI] DynamicTablesPkg/Include/Library/TableHelperLib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DynamicTablesPkg/Include/Library/TableHelperLib.h b/DynamicTablesPkg/Include/Library/TableHelperLib.h index b358223434af76820d34c29c67325919a2283aa7..3eac28a158e9621f6f33a5b538964a16e6b69112 100644 --- a/DynamicTablesPkg/Include/Library/TableHelperLib.h +++ b/DynamicTablesPkg/Include/Library/TableHelperLib.h @@ -17,7 +17,7 @@ /** A helper macro to align a value to the 32-bit word boundary */ -#define ALIGN32(x) ((x) + (sizeof (UINT32) - 1)) & ~(sizeof (UINT32) - 1) +#define ALIGN32(x) (((x) + (sizeof (UINT32) - 1)) & ~(sizeof (UINT32) - 1)) /** The GetCgfMgrInfo function gets the CM_STD_OBJ_CONFIGURATION_MANAGER_INFO object from the Configuration Manager. -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'