Re: [PATCH 1/1] DynamicTablesPkg: Fix void pointer arithmetic

Sami Mujawar

Hi Pierre,

Thank you for this fix.

Reviewed-by: Sami Mujawar <sami.mujawar@...>


Sami Mujawar

On 14/10/2021 03:59 PM, Pierre.Gondois@... wrote:
From: Pierre Gondois <Pierre.Gondois@...>

Building the DynamicTablesPkg with the additional
-Wpointer-arith flag triggers the following error:
"pointer of type ‘void *’ used in arithmetic

Cast the void pointer to fix the error.

Signed-off-by: Pierre Gondois <Pierre.Gondois@...>
.../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 (
- Data += Parser[Index].Length;
+ Data = (UINT8*)Data + Parser[Index].Length;
} // for
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

Join { to automatically receive all group messages.