[edk2-devel] [PATCH v2 1/2] DynamicTablesPkg: SRAT: Fix entry points

Ard Biesheuvel ard.biesheuvel at linaro.org
Tue Mar 31 07:49:13 UTC 2020


On Tue, 31 Mar 2020 at 09:26, Sami Mujawar <sami.mujawar at 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 ImageHandle and the
> SystemTable pointer in the library constructor and destructor
> to make it compatible with the formal declaration.
>
> Signed-off-by: Sami Mujawar <sami.mujawar at arm.com>

Reviewed-by: Ard Biesheuvel <ard.biesheuvel at linaro.org>

> ---
>
> The changes can be seen at:
> https://github.com/samimujawar/edk2/tree/702_srat_vs2017_compile_warning_v2
>
> Notes:
>     V2:
>     - Update commit message to reflect the update to the CONST      [SAMI]
>       qualifier at 2 places in the constructor & destructor.
>
>  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 (#56727): https://edk2.groups.io/g/devel/message/56727
Mute This Topic: https://groups.io/mt/72672165/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list