edk2/ShellPkg/Library
Ard Biesheuvel 3bc03ff552 ShellPkg/AcpiView: Fix unused variable warnings in RimtParser
Clang complains about unused variables:

ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Rimt/RimtParser.c:21:60: error: variable 'mRimtNodeHeader' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
   21 | STATIC EFI_ACPI_6_6_RIMT_NODE_HEADER_STRUCTURE             mRimtNodeHeader;
      |                                                            ^~~~~~~~~~~~~~~
ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Rimt/RimtParser.c:25:60: error: variable 'mRimtIdMappingNode' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
   25 | STATIC EFI_ACPI_6_6_RIMT_ID_MAPPING_STRUCTURE              mRimtIdMappingNode;
      |                                                            ^~~~~~~~~~~~~~~~~~
   28 | STATIC EFI_ACPI_6_6_RIMT_PCIE_ROOT_COMPLEX_NODE_STRUCTURE  mRimtPcieRootComplexNode;
      |                                                            ^~~~~~~~~~~~~~~~~~~~~~~~
ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Rimt/RimtParser.c:29:60: error: variable 'mRimtIommuNode' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
   29 | STATIC EFI_ACPI_6_6_RIMT_IOMMU_NODE_STRUCTURE              mRimtIommuNode;
      |                                                            ^~~~~~~~~~~~~~
4 errors generated.

This is because these variables are only used to take the size of their
fields using the sizeof() operator, which does not support type names
directly.

So create a helper macro SIZE_OF_T () that provides the functionality we
need, and drop the unused variables.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-12-04 08:43:02 +00:00
..
UefiHandleParsingLib ShellPkg/Library: Remove ScsiPassThruProtocolGuid 2025-11-23 18:40:59 +00:00
UefiShellAcpiViewCommandLib ShellPkg/AcpiView: Fix unused variable warnings in RimtParser 2025-12-04 08:43:02 +00:00
UefiShellBcfgCommandLib ShellPkg: Use the newly introduced ShellPrintHiiDefaultEx() alias 2025-10-01 10:02:57 +02:00
UefiShellCEntryLib ShellPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiShellCommandLib ShellPkg: Use the newly introduced ShellPrintDefaultEx() alias 2025-10-01 10:02:57 +02:00
UefiShellDebug1CommandsLib ShellPkg/SmbiosView: Display Type 44 "Referenced Handle" field 2025-10-16 08:57:01 +00:00
UefiShellDriver1CommandsLib ShellPkg: Use the newly introduced ShellPrintDefaultEx() alias 2025-10-01 10:02:57 +02:00
UefiShellInstall1CommandsLib ShellPkg: Fix typos 2023-12-08 13:25:11 +00:00
UefiShellLevel1CommandsLib ShellPkg/For: Remove redundant null/empty checks on ArgSetWalker 2025-12-03 17:41:35 +00:00
UefiShellLevel2CommandsLib ShellPkg/Mv: Harden and optimize trailing-slash trimming 2025-12-03 17:41:35 +00:00
UefiShellLevel3CommandsLib ShellPkg: Use the newly introduced ShellPrintDefaultEx() alias 2025-10-01 10:02:57 +02:00
UefiShellLib ShellPkg: Use the newly introduced ShellPrintDefaultEx() alias 2025-10-01 10:02:57 +02:00
UefiShellNetwork1CommandsLib ShellPkg: Use the newly introduced ShellPrintHiiDefaultEx() alias 2025-10-01 10:02:57 +02:00
UefiShellNetwork2CommandsLib ShellPkg: Use the newly introduced ShellPrintHiiDefaultEx() alias 2025-10-01 10:02:57 +02:00