edk2/ShellPkg/Library/UefiShellAcpiViewCommandLib
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
..
Arm ShellPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Parsers ShellPkg/AcpiView: Fix unused variable warnings in RimtParser 2025-12-04 08:43:02 +00:00
AcpiParser.c ShellPkg: acpiview: Add routines to print reserved fields 2024-08-01 17:20:10 +00:00
AcpiParser.h ShellPkg,acpiview: Add RIMT (RISC-V IO Mapping Table) parser 2025-11-23 21:20:54 +00:00
AcpiTableParser.c ShellPkg: Remove ARM32 Support 2025-09-25 22:04:10 +00:00
AcpiTableParser.h ShellPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
AcpiView.c ShellPkg: Remove ARM32 Support 2025-09-25 22:04:10 +00:00
AcpiView.h ShellPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
AcpiViewConfig.c ShellPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
AcpiViewConfig.h ShellPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiShellAcpiViewCommandLib.c ShellPkg,acpiview: Add RIMT (RISC-V IO Mapping Table) parser 2025-11-23 21:20:54 +00:00
UefiShellAcpiViewCommandLib.inf ShellPkg,acpiview: Add RIMT (RISC-V IO Mapping Table) parser 2025-11-23 21:20:54 +00:00
UefiShellAcpiViewCommandLib.uni ShellPkg,acpiview: Add RIMT (RISC-V IO Mapping Table) parser 2025-11-23 21:20:54 +00:00