diff options
| author | Ard Biesheuvel <ardb@kernel.org> | 2025-11-26 15:33:00 +0300 |
|---|---|---|
| committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2025-12-04 11:43:02 +0300 |
| commit | 3bc03ff552c81259cb838cd286a5a7c074c1aaba (patch) | |
| tree | 90d2a0ace46c6fff643e763374a0257ed0a9d54e /MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptInternalFormat.h | |
| parent | 2b47c81fe6f723100ab2fa893a74b429fe8bbe7e (diff) | |
| download | edk2-3bc03ff552c81259cb838cd286a5a7c074c1aaba.tar.xz | |
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>
Diffstat (limited to 'MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptInternalFormat.h')
0 files changed, 0 insertions, 0 deletions
