From: "Sami Mujawar" <sami.mujawar@arm.com>
To: Pierre.Gondois@arm.com, devel@edk2.groups.io,
Alexei Fedorov <Alexei.Fedorov@arm.com>
Subject: Re: [PATCH 1/1] DynamicTablesPkg: Fix void pointer arithmetic
Date: Wed, 20 Oct 2021 11:14:18 +0100 [thread overview]
Message-ID: <ee7be81b-0fbf-6731-79c8-3b795f773ac9@arm.com> (raw)
In-Reply-To: <20211014145922.19790-1-Pierre.Gondois@arm.com>
Hi Pierre,
Thank you for this fix.
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Regards,
Sami Mujawar
On 14/10/2021 03:59 PM, Pierre.Gondois@arm.com wrote:
> 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
> }
>
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.
prev parent reply other threads:[~2021-10-20 10:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-14 14:59 [PATCH 1/1] DynamicTablesPkg: Fix void pointer arithmetic PierreGondois
2021-10-20 10:14 ` Sami Mujawar [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ee7be81b-0fbf-6731-79c8-3b795f773ac9@arm.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox