TcgTpmPkg: fix build failure of TpmLib with CLANGDWARF

When TpmLib is built with llvm, below error is splat:

  edk2/TcgTpmPkg/Library/TpmLib/TPM/TPMCmd/tpm/src/crypt/CryptRand.c:388:12: error: logical not is only applied to the left hand side of this comparison [-Werror,-Wlogical-not-parentheses]
    388 |         if(DRBG_ENCRYPT_SETUP((BYTE*)key, DRBG_KEY_SIZE_BITS, &localKeySchedule) != 0)

To build TCG TPM v2.0 reference library properly, ignore above warning.

Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
This commit is contained in:
Yeoreum Yun 2026-03-30 12:53:52 +01:00 committed by mergify[bot]
parent ec1f28670a
commit 5107351f77

View file

@ -21,7 +21,7 @@
DEFINE TPM_PLAT_PATH = TPM/TPMCmd/Platform/src
DEFINE TPM_CONF_PATH = TPM/TPMCmd/TpmConfiguration
DEFINE TPM_LIB_OPTIONS_INCLUDE = -include ./TpmLibCompileOptions.h
DEFINE TPM_LIB_WARNING_SUPRESS_GCC = -Wno-unused-function -Wno-implicit-fallthrough -Wno-cast-align -Wno-cast-function-type -Wno-missing-braces -Wno-sign-compare -Wno-suggest-attribute=noreturn -Wno-switch-default -Wno-implicit-function-declaration -Wno-unused-value
DEFINE TPM_LIB_WARNING_SUPRESS_GCC = -Wno-unused-function -Wno-implicit-fallthrough -Wno-cast-align -Wno-cast-function-type -Wno-missing-braces -Wno-sign-compare -Wno-suggest-attribute=noreturn -Wno-switch-default -Wno-implicit-function-declaration -Wno-unused-value -Wno-logical-not-parentheses
#
# VALID_ARCHITECTURES = AARCH64