Skip to content

Commit

Permalink
WhitleyOpenBoardPkg: Fix GCC warnings
Browse files Browse the repository at this point in the history
Remove build option to ignore no-incompatible-pointer-types.
Remove build option to ignore no-overflow warnings.
Fixed resulting warnings as errors.

Cc: Nate DeSimone <[email protected]>
Cc: Chasel Chiu <[email protected]>
Signed-off-by: Isaac Oram <[email protected]>
Reviewed-by: Nate DeSimone <[email protected]>
  • Loading branch information
iworam committed Jul 20, 2022
1 parent 24316d1 commit 1690b98
Show file tree
Hide file tree
Showing 113 changed files with 283 additions and 328 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ PlatformIpmiIoRangeSet (

DEBUG ((DEBUG_INFO, "PlatformIpmiIoRangeSet IpmiIoBase %x\n", IpmiIoBase));

Status = PeiServicesLocatePpi (&gDynamicSiLibraryPpiGuid, 0, NULL, &DynamicSiLibraryPpi);
Status = PeiServicesLocatePpi (&gDynamicSiLibraryPpiGuid, 0, NULL, (VOID **) &DynamicSiLibraryPpi);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "PeiServicesLocatePpi for gDynamicSiLibraryPpiGuid failed. Status %r\n", Status));
ASSERT_EFI_ERROR (Status);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ DisableMEDevices (

DEBUG ((DEBUG_INFO, "DisableMEDevices\n"));

Status = PeiServicesLocatePpi (&gDynamicSiLibraryPpiGuid, 0, NULL, &DynamicSiLibraryPpi);
Status = PeiServicesLocatePpi (&gDynamicSiLibraryPpiGuid, 0, NULL, (VOID **) &DynamicSiLibraryPpi);
if (EFI_ERROR (Status)) {
ASSERT_EFI_ERROR (Status);
return Status;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ IioCfgUpdateEntry (
Status = gBS->LocateProtocol (
&gUbaConfigDatabaseProtocolGuid,
NULL,
&UbaConfigProtocol
(VOID **) &UbaConfigProtocol
);
if (EFI_ERROR(Status)) {
return Status;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ SlotDataUpdateEntry (
Status = gBS->LocateProtocol (
&gUbaConfigDatabaseProtocolGuid,
NULL,
&UbaConfigProtocol
(VOID **) &UbaConfigProtocol
);
if (EFI_ERROR(Status)) {
return Status;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ UsbOcUpdateEntry (
Status = gBS->LocateProtocol (
&gUbaConfigDatabaseProtocolGuid,
NULL,
&UbaConfigProtocol
(VOID **) &UbaConfigProtocol
);
if (EFI_ERROR(Status)) {
return Status;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ GpioGetRiserId (

DEBUG((EFI_D_INFO, "%a Entry...\n", __FUNCTION__));

Status = PeiServicesLocatePpi (&gDynamicSiLibraryPpiGuid, 0, NULL, &DynamicSiLibraryPpi);
Status = PeiServicesLocatePpi (&gDynamicSiLibraryPpiGuid, 0, NULL, (VOID **) &DynamicSiLibraryPpi);
if (EFI_ERROR (Status)) {
ASSERT_EFI_ERROR (Status);
return Status;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ TypeAowandaPchEarlyUpdate(
&gUbaConfigDatabasePpiGuid,
0,
NULL,
&UbaConfigPpi
(VOID **) &UbaConfigPpi
);
if (EFI_ERROR(Status)) {
return Status;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ TypeAowandaPeiBoardInitLibConstructor (
&gUbaConfigDatabasePpiGuid,
0,
NULL,
&UbaConfigPpi
(VOID **) &UbaConfigPpi
);
if (EFI_ERROR(Status)) {
return Status;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ IioCfgUpdateEntry (
Status = gBS->LocateProtocol (
&gUbaConfigDatabaseProtocolGuid,
NULL,
&UbaConfigProtocol
(VOID **) &UbaConfigProtocol
);
if (EFI_ERROR(Status)) {
return Status;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ SlotDataUpdateEntry (
Status = gBS->LocateProtocol (
&gUbaConfigDatabaseProtocolGuid,
NULL,
&UbaConfigProtocol
(VOID **) &UbaConfigProtocol
);
if (EFI_ERROR(Status)) {
return Status;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ UsbOcUpdateEntry (
Status = gBS->LocateProtocol (
&gUbaConfigDatabaseProtocolGuid,
NULL,
&UbaConfigProtocol
(VOID **) &UbaConfigProtocol
);
if (EFI_ERROR(Status)) {
return Status;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ TypeBoardPortTemplatePchLanConfig (
DYNAMIC_SI_LIBARY_PPI *DynamicSiLibraryPpi = NULL;
EFI_STATUS Status;

Status = PeiServicesLocatePpi (&gDynamicSiLibraryPpiGuid, 0, NULL, &DynamicSiLibraryPpi);
Status = PeiServicesLocatePpi (&gDynamicSiLibraryPpiGuid, 0, NULL, (VOID **) &DynamicSiLibraryPpi);
if (EFI_ERROR (Status)) {
ASSERT_EFI_ERROR (Status);
return Status;
Expand Down Expand Up @@ -75,7 +75,7 @@ TypeBoardPortTemplatePchEarlyUpdate(
&gUbaConfigDatabasePpiGuid,
0,
NULL,
&UbaConfigPpi
(VOID **) &UbaConfigPpi
);
if (EFI_ERROR(Status)) {
return Status;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ TypeBoardPortTemplatePeiBoardInitLibConstructor (
&gUbaConfigDatabasePpiGuid,
0,
NULL,
&UbaConfigPpi
(VOID **) &UbaConfigPpi
);
if (EFI_ERROR(Status)) {
return Status;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ PlatformCpuPolicyEntryPoint (
CPU_VAR_DATA *CpuVarDataPtr = NULL;
DYNAMIC_SI_LIBARY_PROTOCOL *DynamicSiLibraryProtocol = NULL;

Status = gBS->LocateProtocol (&gDynamicSiLibraryProtocolGuid, NULL, &DynamicSiLibraryProtocol);
Status = gBS->LocateProtocol (&gDynamicSiLibraryProtocolGuid, NULL, (VOID **) &DynamicSiLibraryProtocol);
if (EFI_ERROR (Status)) {
ASSERT_EFI_ERROR (Status);
return Status;
Expand Down Expand Up @@ -666,7 +666,7 @@ PlatformCpuPolicyEntryPoint (
Status = gBS->LocateProtocol (
&gEfiPlatformTypeProtocolGuid,
NULL,
&PlatformType
(VOID **) &PlatformType
);
ASSERT_EFI_ERROR (Status);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ AcpiOnPciEnumCmplCallback (
{
EFI_STATUS Status;

Status = gBS->LocateProtocol (&gEfiPciEnumerationCompleteProtocolGuid, NULL, &Context);
Status = gBS->LocateProtocol (&gEfiPciEnumerationCompleteProtocolGuid, NULL, (VOID **) &Context);
if (EFI_ERROR (Status)) {
//
// Skip the first dummy event signal.
Expand Down Expand Up @@ -202,7 +202,7 @@ AcpiOnReadyToBootCallback (

DYNAMIC_SI_LIBARY_PROTOCOL *DynamicSiLibraryProtocol = NULL;

Status = gBS->LocateProtocol (&gDynamicSiLibraryProtocolGuid, NULL, &DynamicSiLibraryProtocol);
Status = gBS->LocateProtocol (&gDynamicSiLibraryProtocolGuid, NULL, (VOID **) &DynamicSiLibraryProtocol);
if (EFI_ERROR (Status)) {
ASSERT_EFI_ERROR (Status);
return;
Expand Down Expand Up @@ -332,7 +332,7 @@ AcpiOnReadyToBootCallback (
Status = LocateSupportProtocol (
&gEfiAcpiTableProtocolGuid,
gEfiAcpiTableStorageGuid,
&AcpiTable,
(VOID **) &AcpiTable,
FALSE
);

Expand Down Expand Up @@ -411,7 +411,7 @@ AcpiPlatformEarlyAcpiTablesInstall (
Status = LocateSupportProtocol (
&gEfiAcpiTableProtocolGuid,
gEfiAcpiTableStorageGuid,
&AcpiTable,
(VOID **) &AcpiTable,
FALSE
);

Expand All @@ -423,7 +423,7 @@ AcpiPlatformEarlyAcpiTablesInstall (
Status = LocateSupportProtocol (
&gEfiFirmwareVolume2ProtocolGuid,
gEfiAcpiTableStorageGuid,
&FwVol,
(VOID **) &FwVol,
TRUE
);
ASSERT_EFI_ERROR (Status);
Expand All @@ -442,7 +442,7 @@ AcpiPlatformEarlyAcpiTablesInstall (
&gEfiAcpiTableStorageGuid,
EFI_SECTION_RAW,
Instance,
&CurrentTable,
(VOID **) &CurrentTable,
(UINTN *) &Size,
&FvStatus
);
Expand Down Expand Up @@ -557,7 +557,7 @@ PmSsdtEarlyAcpiTablesInstall (
Status = LocateSupportProtocol (
&gEfiAcpiTableProtocolGuid,
gEfiPmSsdtTableStorageGuid,
&AcpiTable,
(VOID **) &AcpiTable,
FALSE
);

Expand All @@ -569,7 +569,7 @@ PmSsdtEarlyAcpiTablesInstall (
Status = LocateSupportProtocol (
&gEfiFirmwareVolume2ProtocolGuid,
gEfiPmSsdtTableStorageGuid,
&FwVol,
(VOID **) &FwVol,
TRUE
);
ASSERT_EFI_ERROR (Status);
Expand All @@ -588,7 +588,7 @@ PmSsdtEarlyAcpiTablesInstall (
&gEfiPmSsdtTableStorageGuid,
EFI_SECTION_RAW,
Instance,
&CurrentTable,
(VOID **) &CurrentTable,
(UINTN *) &Size,
&FvStatus
);
Expand Down Expand Up @@ -658,7 +658,7 @@ AcpiPlatformEntryPoint (

DYNAMIC_SI_LIBARY_PROTOCOL *DynamicSiLibraryProtocol = NULL;

Status = gBS->LocateProtocol (&gDynamicSiLibraryProtocolGuid, NULL, &DynamicSiLibraryProtocol);
Status = gBS->LocateProtocol (&gDynamicSiLibraryProtocolGuid, NULL, (VOID **) &DynamicSiLibraryProtocol);
if (EFI_ERROR (Status)) {
ASSERT_EFI_ERROR (Status);
return Status;
Expand All @@ -673,7 +673,7 @@ AcpiPlatformEntryPoint (
(EFI_SOFTWARE_DXE_CORE | EFI_SW_DXE_BS_ACPI_INIT)
);

Status = gBS->LocateProtocol (&gEfiIioUdsProtocolGuid, NULL, &mIioUds2);
Status = gBS->LocateProtocol (&gEfiIioUdsProtocolGuid, NULL, (VOID **) &mIioUds2);
if (EFI_ERROR (Status)) {

ASSERT_EFI_ERROR (Status);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,15 +190,15 @@ InstallAndPatchAcpiTable (
Status = LocateSupportProtocol (
&gEfiAcpiTableProtocolGuid,
gEfiAcpiTableStorageGuid,
&AcpiTable,
(VOID **) &AcpiTable,
FALSE
);
ASSERT_EFI_ERROR (Status);

Status = LocateSupportProtocol (
&gEfiFirmwareVolume2ProtocolGuid,
gEfiAcpiTableStorageGuid,
&FwVol,
(VOID **) &FwVol,
TRUE
);
ASSERT_EFI_ERROR (Status);
Expand All @@ -210,7 +210,7 @@ InstallAndPatchAcpiTable (
&gEfiAcpiTableStorageGuid,
EFI_SECTION_RAW,
Instance,
&CurrentTable,
(VOID **) &CurrentTable,
(UINTN *) &Size,
&FvStatus
);
Expand Down Expand Up @@ -294,7 +294,7 @@ InstallXhciAcpiTable (
Status = LocateSupportProtocol (
&gEfiAcpiTableProtocolGuid,
gEfiAcpiTableStorageGuid,
&AcpiTable,
(VOID **) &AcpiTable,
FALSE
);

Expand All @@ -306,7 +306,7 @@ InstallXhciAcpiTable (
Status = LocateSupportProtocol (
&gEfiFirmwareVolume2ProtocolGuid,
gEfiAcpiTableStorageGuid,
&FwVol,
(VOID **) &FwVol,
TRUE
);

Expand All @@ -321,7 +321,7 @@ InstallXhciAcpiTable (
&gEfiAcpiTableStorageGuid,
EFI_SECTION_RAW,
Instance,
&CurrentTable,
(VOID **) &CurrentTable,
&Size,
&FvStatus
);
Expand Down Expand Up @@ -374,7 +374,7 @@ DetectHwpFeature (
EFI_STATUS Status;
DYNAMIC_SI_LIBARY_PROTOCOL2 *DynamicSiLibraryProtocol2 = NULL;

Status = gBS->LocateProtocol (&gDynamicSiLibraryProtocol2Guid, NULL, &DynamicSiLibraryProtocol2);
Status = gBS->LocateProtocol (&gDynamicSiLibraryProtocol2Guid, NULL, (VOID **) &DynamicSiLibraryProtocol2);
if (EFI_ERROR (Status)) {
ASSERT_EFI_ERROR (Status);
return FALSE;
Expand Down
Loading

0 comments on commit 1690b98

Please sign in to comment.