From cef0e0ad6fa595d5d6a7b09628b71636c3a20eea Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Tue, 18 Apr 2023 18:53:44 +0200 Subject: vendorcode/cavium: Fix additions to string The clang compiler is confused about adding integers to strings. Adding brackets around the macros fixes this. TEST: BUILD_TIMELESS=1 remains the same. Change-Id: I2ea17322352d977bf0ec3ee71b14463fa218d07c Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/74541 Reviewed-by: Felix Singer Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) --- src/vendorcode/cavium/bdk/libbdk-hal/bdk-qlm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vendorcode/cavium/bdk/libbdk-hal/bdk-qlm.c b/src/vendorcode/cavium/bdk/libbdk-hal/bdk-qlm.c index 18d9081922..ced70fdd70 100644 --- a/src/vendorcode/cavium/bdk/libbdk-hal/bdk-qlm.c +++ b/src/vendorcode/cavium/bdk/libbdk-hal/bdk-qlm.c @@ -58,7 +58,7 @@ BDK_REQUIRE_DEFINE(QLM); */ const char *bdk_qlm_mode_to_cfg_str(bdk_qlm_modes_t mode) { -#define MODE_CASE(m) case m: return #m+13 +#define MODE_CASE(m) case (m): return (#m)+13 switch (mode) { MODE_CASE(BDK_QLM_MODE_DISABLED); -- cgit v1.2.3