From: "PierreGondois" <pierre.gondois@arm.com>
To: devel@edk2.groups.io, Sami Mujawar <sami.mujawar@arm.com>,
Alexei Fedorov <Alexei.Fedorov@arm.com>
Subject: [PATCH 1/1] DynamicTablesPkg: Fix void pointer arithmetic
Date: Thu, 14 Oct 2021 15:59:22 +0100 [thread overview]
Message-ID: <20211014145922.19790-1-Pierre.Gondois@arm.com> (raw)
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
next reply other threads:[~2021-10-14 14:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-14 14:59 PierreGondois [this message]
2021-10-20 10:14 ` [PATCH 1/1] DynamicTablesPkg: Fix void pointer arithmetic Sami Mujawar
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=20211014145922.19790-1-Pierre.Gondois@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