public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 1/1] DynamicTablesPkg: Fix void pointer arithmetic
@ 2021-10-14 14:59 PierreGondois
  2021-10-20 10:14 ` Sami Mujawar
  0 siblings, 1 reply; 2+ messages in thread
From: PierreGondois @ 2021-10-14 14:59 UTC (permalink / raw)
  To: devel, Sami Mujawar, Alexei Fedorov

From: Pierre Gondois <Pierre.Gondois@arm.com>

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 <Pierre.Gondois@arm.com>
---
 .../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 2337d47e3fb3..0bdbfbb99c33 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
 }
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-20 10:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-14 14:59 [PATCH 1/1] DynamicTablesPkg: Fix void pointer arithmetic PierreGondois
2021-10-20 10:14 ` Sami Mujawar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox