VS2017 reports 'warning C4028: formal parameter 2 different
from declaration' for the library constructor and destructor
interfaces for the SRAT Generator modules.
Remove the CONST qualifier for the SystemTable pointer (the
second parameter to the constructor/destructor/DXE Entry
point) to make it compatible with the formal declaration.
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
---
DynamicTablesPkg/Library/Acpi/Arm/AcpiSratLibArm/SratGenerator.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSratLibArm/SratGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSratLibArm/SratGenerator.c
index 5d56af66608d862e6eca81da812d719f110867d2..74cb7d92a5d8cddd3df8334f3ab55e6fa3e7267a 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSratLibArm/SratGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSratLibArm/SratGenerator.c
@@ -800,8 +800,8 @@ ACPI_TABLE_GENERATOR SratGenerator = {
EFI_STATUS
EFIAPI
AcpiSratLibConstructor (
- IN CONST EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE * CONST SystemTable
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE * SystemTable
)
{
EFI_STATUS Status;
@@ -823,8 +823,8 @@ AcpiSratLibConstructor (
EFI_STATUS
EFIAPI
AcpiSratLibDestructor (
- IN CONST EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE * CONST SystemTable
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE * SystemTable
)
{
EFI_STATUS Status;
--
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#56581): https://edk2.groups.io/g/devel/message/56581
Mute This Topic: https://groups.io/mt/72634737/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
On Sun, 29 Mar 2020 at 19:38, Sami Mujawar <sami.mujawar@arm.com> wrote:
>
> VS2017 reports 'warning C4028: formal parameter 2 different
> from declaration' for the library constructor and destructor
> interfaces for the SRAT Generator modules.
>
> Remove the CONST qualifier for the SystemTable pointer (the
> second parameter to the constructor/destructor/DXE Entry
> point) to make it compatible with the formal declaration.
>
You are removing the CONST qualifier from two places, no?
> Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
> ---
> DynamicTablesPkg/Library/Acpi/Arm/AcpiSratLibArm/SratGenerator.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSratLibArm/SratGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSratLibArm/SratGenerator.c
> index 5d56af66608d862e6eca81da812d719f110867d2..74cb7d92a5d8cddd3df8334f3ab55e6fa3e7267a 100644
> --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSratLibArm/SratGenerator.c
> +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSratLibArm/SratGenerator.c
> @@ -800,8 +800,8 @@ ACPI_TABLE_GENERATOR SratGenerator = {
> EFI_STATUS
> EFIAPI
> AcpiSratLibConstructor (
> - IN CONST EFI_HANDLE ImageHandle,
> - IN EFI_SYSTEM_TABLE * CONST SystemTable
> + IN EFI_HANDLE ImageHandle,
> + IN EFI_SYSTEM_TABLE * SystemTable
> )
> {
> EFI_STATUS Status;
> @@ -823,8 +823,8 @@ AcpiSratLibConstructor (
> EFI_STATUS
> EFIAPI
> AcpiSratLibDestructor (
> - IN CONST EFI_HANDLE ImageHandle,
> - IN EFI_SYSTEM_TABLE * CONST SystemTable
> + IN EFI_HANDLE ImageHandle,
> + IN EFI_SYSTEM_TABLE * SystemTable
Can we keep the * with the argument name, please?
> )
> {
> EFI_STATUS Status;
> --
> 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'
>
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#56606): https://edk2.groups.io/g/devel/message/56606
Mute This Topic: https://groups.io/mt/72634737/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Hi Ard,
Please see my reply inline marked [SAMI].
Regards,
Sami Mujawar
-----Original Message-----
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Sent: 30 March 2020 09:08 AM
To: edk2-devel-groups-io <devel@edk2.groups.io>; Sami Mujawar <Sami.Mujawar@arm.com>
Cc: Alexei Fedorov <Alexei.Fedorov@arm.com>; Matteo Carlini <Matteo.Carlini@arm.com>; Laura Moretta <Laura.Moretta@arm.com>; nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH v1 1/2] DynamicTablesPkg: SRAT: Fix entry points
On Sun, 29 Mar 2020 at 19:38, Sami Mujawar <sami.mujawar@arm.com> wrote:
>
> VS2017 reports 'warning C4028: formal parameter 2 different from
> declaration' for the library constructor and destructor interfaces for
> the SRAT Generator modules.
>
> Remove the CONST qualifier for the SystemTable pointer (the second
> parameter to the constructor/destructor/DXE Entry
> point) to make it compatible with the formal declaration.
>
You are removing the CONST qualifier from two places, no?
[SAMI] Yes, CONST is removed from 2 places. I will update the commit message. If you think this must be changed, then we need to do that as part of a separate patch series.
> Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
> ---
> DynamicTablesPkg/Library/Acpi/Arm/AcpiSratLibArm/SratGenerator.c | 8
> ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git
> a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSratLibArm/SratGenerator.c
> b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSratLibArm/SratGenerator.c
> index
> 5d56af66608d862e6eca81da812d719f110867d2..74cb7d92a5d8cddd3df8334f3ab5
> 5e6fa3e7267a 100644
> --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSratLibArm/SratGenerator.c
> +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSratLibArm/SratGenerator.c
> @@ -800,8 +800,8 @@ ACPI_TABLE_GENERATOR SratGenerator = { EFI_STATUS
> EFIAPI AcpiSratLibConstructor (
> - IN CONST EFI_HANDLE ImageHandle,
> - IN EFI_SYSTEM_TABLE * CONST SystemTable
> + IN EFI_HANDLE ImageHandle,
> + IN EFI_SYSTEM_TABLE * SystemTable
> )
> {
> EFI_STATUS Status;
> @@ -823,8 +823,8 @@ AcpiSratLibConstructor ( EFI_STATUS EFIAPI
> AcpiSratLibDestructor (
> - IN CONST EFI_HANDLE ImageHandle,
> - IN EFI_SYSTEM_TABLE * CONST SystemTable
> + IN EFI_HANDLE ImageHandle,
> + IN EFI_SYSTEM_TABLE * SystemTable
Can we keep the * with the argument name, please?
[SAMI] We have used the above convention throughout the package.
> )
> {
> EFI_STATUS Status;
> --
> 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'
>
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#56671): https://edk2.groups.io/g/devel/message/56671
Mute This Topic: https://groups.io/mt/72634737/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Reviewed by: Alexei Fedorov Alexei.Fedorov@arm.com -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#56617): https://edk2.groups.io/g/devel/message/56617 Mute This Topic: https://groups.io/mt/72634737/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2026 Red Hat, Inc.