mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
DynamicTablesPkg: fix SmbiosType2Genertor build failure with clang
BaseboardCount type is UINT32. Using MAX_UINTN in the comparision
triggers below build error:
type 'UINT32' (aka 'unsigned int') is always false
[-Werror,-Wtautological-constant-out-of-range-compare]
199 | (BaseboardCount > (MAX_UINTN / sizeof (*CmObjectList))))
To address this, use MAX_UINT32 instead of MAX_UINTN.
Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
This commit is contained in:
parent
cc9a0425a2
commit
193216cbfc
1 changed files with 2 additions and 2 deletions
|
|
@ -195,8 +195,8 @@ BuildSmbiosType2TableEx (
|
|||
}
|
||||
|
||||
if ((BaseboardInfo == NULL) ||
|
||||
(BaseboardCount > (MAX_UINTN / sizeof (*TableList))) ||
|
||||
(BaseboardCount > (MAX_UINTN / sizeof (*CmObjectList))))
|
||||
(BaseboardCount > (MAX_UINT32 / sizeof (*TableList))) ||
|
||||
(BaseboardCount > (MAX_UINT32 / sizeof (*CmObjectList))))
|
||||
{
|
||||
DEBUG ((DEBUG_ERROR, "%a: Invalid Baseboard object list\n", __func__));
|
||||
return EFI_INVALID_PARAMETER;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue