From 99730f29b2f8874bc7bfad383ea8eb52679e8897 Mon Sep 17 00:00:00 2001 From: Callum Farmer Date: Thu, 11 May 2023 15:12:36 +0100 Subject: Structs with no linkage Signed-off-by: Callum Farmer --- lib/dpath.c | 5 +++-- lib/error.c | 9 +++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/dpath.c b/lib/dpath.c index 5e079d6..63e4e70 100644 --- a/lib/dpath.c +++ b/lib/dpath.c @@ -1083,11 +1083,12 @@ _DevPathNodeUnknown ( * Entries hold "Type" and "SubType" for know values. * Special "SubType" 0 is used as default for known type with unknown subtype. */ -struct { +typedef struct { UINT8 Type; UINT8 SubType; VOID (*Function)(POOL_PRINT *, VOID *); -} DevPathTable[] = { +} DevPathTable_Type; +DevPathTable_Type DevPathTable[] = { { HARDWARE_DEVICE_PATH, HW_PCI_DP, _DevPathPci}, { HARDWARE_DEVICE_PATH, HW_PCCARD_DP, _DevPathPccard}, { HARDWARE_DEVICE_PATH, HW_MEMMAP_DP, _DevPathMemMap}, diff --git a/lib/error.c b/lib/error.c index 2399a06..9f3b230 100644 --- a/lib/error.c +++ b/lib/error.c @@ -18,10 +18,11 @@ Revision History #include "lib.h" -struct { - EFI_STATUS Code; - WCHAR *Desc; -} ErrorCodeTable[] = { +typedef struct { + EFI_STATUS Code; + WCHAR *Desc; +} ErrorCodeTable_Type; +ErrorCodeTable_Type ErrorCodeTable[] = { { EFI_SUCCESS, L"Success"}, { EFI_LOAD_ERROR, L"Load Error"}, { EFI_INVALID_PARAMETER, L"Invalid Parameter"}, -- cgit v1.2.1