From 6893865b3010bb6192f732643c4b8ba026726d07 Mon Sep 17 00:00:00 2001 From: Pierre Gondois Date: Thu, 14 Oct 2021 15:59:22 +0100 Subject: [PATCH] DynamicTablesPkg: Fix void pointer arithmetic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Building the DynamicTablesPkg with the additional -Wpointer-arith flag triggers the following error: "pointer of type ‘void *’ used in arithmetic [-Werror=pointer-arith]" Cast the void pointer to fix the error. Signed-off-by: Pierre Gondois Reviewed-by: Sami Mujawar --- .../Common/TableHelperLib/ConfigurationManagerObjectParser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c index 2337d47e3f..0bdbfbb99c 100644 --- a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c +++ b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c @@ -641,7 +641,7 @@ PrintCmObjDesc ( )); } DEBUG ((DEBUG_ERROR, "\n")); - Data += Parser[Index].Length; + Data = (UINT8*)Data + Parser[Index].Length; } // for }