Skip to content

Commit

Permalink
WhitleyOpenBoardPkg: Fix GCC unused variables warnings
Browse files Browse the repository at this point in the history
Removed build options to ignore no-discarded-qualifiers warnings.
Removed build option to ignore no-unused-variable warnings.
Fixed resulting build issues.

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 1690b98 commit ccfc200
Show file tree
Hide file tree
Showing 50 changed files with 197 additions and 127 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
WhitleyOpenBoardPkg/PlatformPkg.dec

[Guids]
gPlatformIioConfigDataDxeGuid
gPlatformIioConfigDataDxeGuid_1
gPlatformIioConfigDataDxeGuid_2
gPlatformIioConfigDataDxeGuid_3

[FixedPcd]
gEfiCpRcPkgTokenSpaceGuid.PcdMaxCpuSocketCount
Expand All @@ -46,4 +50,4 @@
gUbaConfigDatabaseProtocolGuid

[Depex]
gEfiPlatformTypeAowandaProtocolGuid
gEfiPlatformTypeAowandaProtocolGuid
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
WhitleyOpenBoardPkg/PlatformPkg.dec

[Guids]
gPlatformSlotDataDxeGuid

[FixedPcd]
gEfiCpRcPkgTokenSpaceGuid.PcdMaxCpuSocketCount
Expand All @@ -46,4 +47,4 @@
gUbaConfigDatabaseProtocolGuid

[Depex]
gEfiPlatformTypeAowandaProtocolGuid
gEfiPlatformTypeAowandaProtocolGuid
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@
WhitleyOpenBoardPkg/PlatformPkg.dec

[Guids]
gDxePlatformUbaOcConfigDataGuid

[Protocols]
gUbaConfigDatabaseProtocolGuid

[Depex]
gEfiPlatformTypeAowandaProtocolGuid
gEfiPlatformTypeAowandaProtocolGuid
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,17 @@

[Guids]
gPlatformGpioInitDataGuid
gPlatformIioConfigDataGuid
gPlatformIioConfigDataGuid_1
gPlatformIioConfigDataGuid_2
gPlatformIioConfigDataGuid_3
gPlatformPcdConfigDataGuid
gPlatformPchEarlyConfigDataGuid
gPlatformSlotDataGuid
gPlatformSlotDataGuid2
gPlatformPciSlotImplementedGuid
gPlatformPchSoftStrapConfigDataGuid
gPeiPlatformUbaOcConfigDataGuid

[Depex]
gDynamicSiLibraryPpiGuid
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
WhitleyOpenBoardPkg/PlatformPkg.dec

[Guids]
gPlatformIioConfigDataDxeGuid
gPlatformIioConfigDataDxeGuid_1
gPlatformIioConfigDataDxeGuid_2
gPlatformIioConfigDataDxeGuid_3

[FixedPcd]
gEfiCpRcPkgTokenSpaceGuid.PcdMaxCpuSocketCount
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
WhitleyOpenBoardPkg/PlatformPkg.dec

[Guids]
gPlatformSlotDataDxeGuid

[FixedPcd]
gEfiCpRcPkgTokenSpaceGuid.PcdMaxCpuSocketCount
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
WhitleyOpenBoardPkg/PlatformPkg.dec

[Guids]
gDxePlatformUbaOcConfigDataGuid

[Protocols]
gUbaConfigDatabaseProtocolGuid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,17 @@

[Guids]
gPlatformGpioInitDataGuid
gPlatformIioConfigDataGuid
gPlatformIioConfigDataGuid_1
gPlatformIioConfigDataGuid_2
gPlatformIioConfigDataGuid_3
gPlatformPcdConfigDataGuid
gPlatformPchEarlyConfigDataGuid
gPlatformSlotDataGuid
gPlatformSlotDataGuid2
gPlatformPciSlotImplementedGuid
gPlatformPchSoftStrapConfigDataGuid
gPeiPlatformUbaOcConfigDataGuid

[Depex]
gDynamicSiLibraryPpiGuid
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
gEfiSetupVariableGuid
gPchSetupVariableGuid
gSystemBoardInfoConfigDataGuid
gPlatformOptionRomUpdateConfigDataGuid

[Pcd]
gPlatformTokenSpaceGuid.PcdOemSkuPcieSlotOpromBitMap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ DEFINE EDKII_DSC_FEATURE_BUILD_OPTIONS = $(EDKII_DSC_FEATURE_BUILD_OPTIONS) $(ME
MSFT:*_*_*_DLINK_FLAGS = /ALIGN:4096

[BuildOptions]
GCC:*_GCC5_*_CC_FLAGS = -Wno-discarded-qualifiers -Wno-unused-variable -Wno-unused-but-set-variable -mabi=ms
GCC:*_GCC5_*_CC_FLAGS = -Wno-unused-but-set-variable -mabi=ms
GCC:*_GCC5_IA32_DLINK_FLAGS = -z common-page-size=0x20 -z muldefs
GCC:*_GCC5_X64_DLINK_FLAGS = -z common-page-size=0x20 -z muldefs
MSFT:*_*_*_CC_FLAGS = /FAsc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,4 @@ PlatformGetAcpiFixTableDataPointer (
IN VOID **TablePtr
);

STATIC EFI_GUID gPlatformAcpiFixTableGuid = PLATFORM_ACPI_FIX_TABLE_GUID;

#endif //_PLATFORM_ACPI_UPDATE_LIB_H
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,4 @@ PlatformUpdateClockgen (
IN BOOLEAN EnableSpreadSpectrum
);

STATIC EFI_GUID gPlatformClockgenConfigDataGuid = PLATFORM_CLOCKGEN_CONFIG_DATA_GUID;

#endif //_UBA_CLOCKGEN_UPDATE_LIB_H
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,4 @@ IsManufacturingMode (
VOID
);


STATIC EFI_GUID gPlatformGpioPlatformConfigDataGuid = PLATFORM_GPIO_PLATFORM_CONFIG_DATA_GUID;

#endif //_UBA_GPIO_PLATFORM_CONFIG_LIB_H

Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,4 @@ PlatformUpdateGpios (
VOID
);

STATIC EFI_GUID gPlatformGpioConfigDataGuid = PLATFORM_GPIO_CONFIG_DATA_GUID;

#endif //_UBA_GPIO_UPDATE_LIB_H
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,4 @@ InstallPlatformHsioPtssTable (
IN OUT PCH_POLICY_PPI *PchPolicy
);

STATIC EFI_GUID gPlatformHsioPtssTableGuid = PLATFORM_HSIO_PTSS_TABLE_GUID;

#endif //_UBA_HSIO_PTSS_TABLE_CONFIG_LIB_H

Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,4 @@ PlatformUpdateIioConfig_EX (
IN IIO_GLOBALS *IioGlobalData
);

STATIC EFI_GUID gPlatformIioConfigDataGuid = PLATFORM_IIO_CONFIG_DATA_GUID;
STATIC EFI_GUID gPlatformIioConfigDataGuid_1 = PLATFORM_IIO_CONFIG_DATA_GUID_1;
STATIC EFI_GUID gPlatformIioConfigDataGuid_2 = PLATFORM_IIO_CONFIG_DATA_GUID_2;
STATIC EFI_GUID gPlatformIioConfigDataGuid_3 = PLATFORM_IIO_CONFIG_DATA_GUID_3;

STATIC EFI_GUID gPlatformIioConfigDataDxeGuid = PLATFORM_IIO_CONFIG_DATA_DXE_GUID;
STATIC EFI_GUID gPlatformIioConfigDataDxeGuid_1 = PLATFORM_IIO_CONFIG_DATA_DXE_GUID_1;
STATIC EFI_GUID gPlatformIioConfigDataDxeGuid_2 = PLATFORM_IIO_CONFIG_DATA_DXE_GUID_2;
STATIC EFI_GUID gPlatformIioConfigDataDxeGuid_3 = PLATFORM_IIO_CONFIG_DATA_DXE_GUID_3;

#endif //_UBA_IIO_CONFIG_LIB_H
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,4 @@ IioPortBifurcationInit (
IN IIO_GLOBALS *IioGlobalData
);

STATIC EFI_GUID gIioPortBifurcationInitDataGuid = IIO_PORT_BIFURCATION_INIT_GUID;

#endif //_UBA_IIO_PORT_BIFURCATION_INIT_LIB_H

Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@
#define PLATFORM_OPTION_ROM_UPDATE_SIGNATURE SIGNATURE_32 ('P', 'B', 'D', 'S')
#define PLATFORM_OPTION_ROM_UPDATE_VERSION 01


// {371BD79C-DE79-4c5f-AA2B-BC9EBEFA988F}
STATIC EFI_GUID gPlatformOptionRomUpdateConfigDataGuid =
{ 0x371bd79c, 0xde79, 0x4c5f, { 0xaa, 0x2b, 0xbc, 0x9e, 0xbe, 0xfa, 0x98, 0x8f } };


typedef struct {
EFI_GUID FileName;
UINTN Segment;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,4 @@ PlatformUpdatePcds (
VOID
);

STATIC EFI_GUID gPlatformPcdConfigDataGuid = PLATFORM_PCD_CONFIG_DATA_GUID;

#endif //_UBA_PCD_UPDATE_LIB_H
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,4 @@ PlatformInitLateHook (
IN SYSTEM_CONFIGURATION *SystemConfig
);


STATIC EFI_GUID gPlatformPchEarlyConfigDataGuid = PLATFORM_PCH_EARLY_CONFIG_DATA_GUID;

#endif //_PLATFORM_PCH_EARLY_UPDATE_LIB_H
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,4 @@ PlatformPchGetPciSlotImplementedTableData (
IN OUT UINT8 **SlotImplementedTable
);

STATIC EFI_GUID gPlatformSlotDataGuid = PLATFORM_SLOT_DATA_GUID;
STATIC EFI_GUID gPlatformSlotDataGuid2 = PLATFORM_SLOT_DATA_GUID2;
STATIC EFI_GUID gPlatformSlotDataGuid2_1 = PLATFORM_SLOT_DATA_GUID2_1;


STATIC EFI_GUID gPlatformSlotDataDxeGuid = PLATFORM_SLOT_DATA_DXE_GUID;
STATIC EFI_GUID gPlatformSlotDataDxeGuid2 = PLATFORM_SLOT_DATA_DXE_GUID2;
STATIC EFI_GUID gPlatformSlotDataDxeGuid2_1 = PLATFORM_SLOT_DATA_DXE_GUID2_1;

STATIC EFI_GUID gPlatformPciSlotImplementedGuid = PLATFORM_PCI_SLOT_IMPLEMENTED_GUID;


#endif //_UBA_SLOT_UPDATE_LIB_H
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
#define PLATFORM_PCH_SOFTSTRAP_CONFIG_DATA_GUID \
{ 0xf06383fe, 0x54bd, 0x4ae1, { 0x9c, 0x99, 0x1d, 0xc8, 0x3b, 0x6a, 0x72, 0x77 } }

STATIC EFI_GUID gPlatformPchSoftStrapConfigDataGuid = PLATFORM_PCH_SOFTSTRAP_CONFIG_DATA_GUID;

typedef struct _PLATFORM_PCH_SOFTSTRAP_FIXUP_ENTRY {
UINT8 SoftStrapNumber;
UINT8 BitfieldOffset;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
#define SYSTEM_CONFIG_UPDATE_SIGNATURE SIGNATURE_32 ('S', 'C', 'O', 'N')
#define SYSTEM_CONFIG_UPDATE_VERSION 01

STATIC EFI_GUID gSystemConfigUpdateDataGuid =
{ 0x41037136, 0x8834, 0x4F35, { 0xBB, 0x10, 0x28, 0x0, 0x87, 0xAD, 0xB2, 0x22 } };

typedef
VOID
(*IIO_DEFAULT_CONFIG_UPDATE_CALLBACK) (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,5 @@ PlatformGetUsbOcMappings (
IN OUT USB_OVERCURRENT_PIN **Usb30OverCurrentMappings,
IN OUT USB2_PHY_PARAMETERS **Usb20AfeParams
);
STATIC EFI_GUID gPeiPlatformUbaOcConfigDataGuid = PEI_PLATFORM_USBOC_CONFIG_DATA_GUID;
STATIC EFI_GUID gDxePlatformUbaOcConfigDataGuid = DXE_PLATFORM_USBOC_CONFIG_DATA_GUID;

#endif //_UBA_USBOC_UPDATE_LIB_H
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
WhitleyOpenBoardPkg/PlatformPkg.dec

[Guids]
gPlatformIioConfigDataDxeGuid
gPlatformIioConfigDataDxeGuid_1
gPlatformIioConfigDataDxeGuid_2
gPlatformIioConfigDataDxeGuid_3

[FixedPcd]
gEfiCpRcPkgTokenSpaceGuid.PcdMaxCpuSocketCount
Expand All @@ -45,4 +49,4 @@
gUbaConfigDatabaseProtocolGuid

[Depex]
gEfiPlatformTypeJunctionCityProtocolGuid
gEfiPlatformTypeJunctionCityProtocolGuid
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
WhitleyOpenBoardPkg/PlatformPkg.dec

[Guids]
gPlatformSlotDataDxeGuid

[FixedPcd]
gEfiCpRcPkgTokenSpaceGuid.PcdMaxCpuSocketCount
Expand All @@ -45,4 +46,4 @@
gUbaConfigDatabaseProtocolGuid

[Depex]
gEfiPlatformTypeJunctionCityProtocolGuid
gEfiPlatformTypeJunctionCityProtocolGuid
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@
WhitleyOpenBoardPkg/PlatformPkg.dec

[Guids]
gDxePlatformUbaOcConfigDataGuid

[Protocols]
gUbaConfigDatabaseProtocolGuid

[Depex]
gEfiPlatformTypeJunctionCityProtocolGuid
gEfiPlatformTypeJunctionCityProtocolGuid
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,17 @@

[Guids]
gPlatformGpioInitDataGuid
gPlatformIioConfigDataGuid
gPlatformIioConfigDataGuid_1
gPlatformIioConfigDataGuid_2
gPlatformIioConfigDataGuid_3
gPlatformPcdConfigDataGuid
gPlatformPchEarlyConfigDataGuid
gPlatformSlotDataGuid
gPlatformSlotDataGuid2
gPlatformPciSlotImplementedGuid
gPlatformPchSoftStrapConfigDataGuid
gPeiPlatformUbaOcConfigDataGuid

[Depex]
gDynamicSiLibraryPpiGuid
Original file line number Diff line number Diff line change
Expand Up @@ -44,58 +44,6 @@ typedef struct {
UINT32 GsiBase;
} IO_APIC_DESCRIPTOR;

STATIC CONST IO_APIC_DESCRIPTOR IoApicDescList[] = {
{PCH_IOAPIC, PCH_IOAPIC_ID, PCH_INTERRUPT_BASE},
{PC00_IOAPIC, PC00_IOAPIC_ID, PC00_INTERRUPT_BASE},
{PC01_IOAPIC, PC01_IOAPIC_ID, PC01_INTERRUPT_BASE},
{PC02_IOAPIC, PC02_IOAPIC_ID, PC02_INTERRUPT_BASE},
{PC03_IOAPIC, PC03_IOAPIC_ID, PC03_INTERRUPT_BASE},
{PC04_IOAPIC, PC04_IOAPIC_ID, PC04_INTERRUPT_BASE},
{PC05_IOAPIC, PC05_IOAPIC_ID, PC05_INTERRUPT_BASE},
{PC06_IOAPIC, PC06_IOAPIC_ID, PC06_INTERRUPT_BASE},
{PC07_IOAPIC, PC07_IOAPIC_ID, PC07_INTERRUPT_BASE},
{PC08_IOAPIC, PC08_IOAPIC_ID, PC08_INTERRUPT_BASE},
{PC09_IOAPIC, PC09_IOAPIC_ID, PC09_INTERRUPT_BASE},
{PC10_IOAPIC, PC10_IOAPIC_ID, PC10_INTERRUPT_BASE},
{PC11_IOAPIC, PC11_IOAPIC_ID, PC11_INTERRUPT_BASE},
{PC12_IOAPIC, PC12_IOAPIC_ID, PC12_INTERRUPT_BASE},
{PC13_IOAPIC, PC13_IOAPIC_ID, PC13_INTERRUPT_BASE},
{PC14_IOAPIC, PC14_IOAPIC_ID, PC14_INTERRUPT_BASE},
{PC15_IOAPIC, PC15_IOAPIC_ID, PC15_INTERRUPT_BASE},
{PC16_IOAPIC, PC16_IOAPIC_ID, PC16_INTERRUPT_BASE},
{PC17_IOAPIC, PC17_IOAPIC_ID, PC17_INTERRUPT_BASE},
{PC18_IOAPIC, PC18_IOAPIC_ID, PC18_INTERRUPT_BASE},
{PC19_IOAPIC, PC19_IOAPIC_ID, PC19_INTERRUPT_BASE},
{PC20_IOAPIC, PC20_IOAPIC_ID, PC20_INTERRUPT_BASE},
{PC21_IOAPIC, PC21_IOAPIC_ID, PC21_INTERRUPT_BASE},
{PC22_IOAPIC, PC22_IOAPIC_ID, PC22_INTERRUPT_BASE},
{PC23_IOAPIC, PC23_IOAPIC_ID, PC23_INTERRUPT_BASE},
{PC24_IOAPIC, PC24_IOAPIC_ID, PC24_INTERRUPT_BASE},
{PC25_IOAPIC, PC25_IOAPIC_ID, PC25_INTERRUPT_BASE},
{PC26_IOAPIC, PC26_IOAPIC_ID, PC26_INTERRUPT_BASE},
{PC27_IOAPIC, PC27_IOAPIC_ID, PC27_INTERRUPT_BASE},
{PC28_IOAPIC, PC28_IOAPIC_ID, PC28_INTERRUPT_BASE},
{PC29_IOAPIC, PC29_IOAPIC_ID, PC29_INTERRUPT_BASE},
{PC30_IOAPIC, PC30_IOAPIC_ID, PC30_INTERRUPT_BASE},
{PC31_IOAPIC, PC31_IOAPIC_ID, PC31_INTERRUPT_BASE},
{PC32_IOAPIC, PC32_IOAPIC_ID, PC32_INTERRUPT_BASE},
{PC33_IOAPIC, PC33_IOAPIC_ID, PC33_INTERRUPT_BASE},
{PC34_IOAPIC, PC34_IOAPIC_ID, PC34_INTERRUPT_BASE},
{PC35_IOAPIC, PC35_IOAPIC_ID, PC35_INTERRUPT_BASE},
{PC36_IOAPIC, PC36_IOAPIC_ID, PC36_INTERRUPT_BASE},
{PC37_IOAPIC, PC37_IOAPIC_ID, PC37_INTERRUPT_BASE},
{PC38_IOAPIC, PC38_IOAPIC_ID, PC38_INTERRUPT_BASE},
{PC39_IOAPIC, PC39_IOAPIC_ID, PC39_INTERRUPT_BASE},
{PC40_IOAPIC, PC40_IOAPIC_ID, PC40_INTERRUPT_BASE},
{PC41_IOAPIC, PC41_IOAPIC_ID, PC41_INTERRUPT_BASE},
{PC42_IOAPIC, PC42_IOAPIC_ID, PC42_INTERRUPT_BASE},
{PC43_IOAPIC, PC43_IOAPIC_ID, PC43_INTERRUPT_BASE},
{PC44_IOAPIC, PC44_IOAPIC_ID, PC44_INTERRUPT_BASE},
{PC45_IOAPIC, PC45_IOAPIC_ID, PC45_INTERRUPT_BASE},
{PC46_IOAPIC, PC46_IOAPIC_ID, PC46_INTERRUPT_BASE},
{PC47_IOAPIC, PC47_IOAPIC_ID, PC47_INTERRUPT_BASE}
};

/**
Find OrderTable index which is matching input ApicId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ VOID * FindDefaultHobinFfs (
IN UINT16 BoardId
)
{
EFI_PEI_SERVICES **PeiServices;
UINTN FvInstance;
EFI_PEI_FV_HANDLE FvHandle;
EFI_PEI_FILE_HANDLE *FfsHandle;
Expand Down
Loading

0 comments on commit ccfc200

Please sign in to comment.