summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Debieve <lionel.debieve@foss.st.com>2022-10-05 11:40:15 +0200
committerLionel Debieve <lionel.debieve@foss.st.com>2022-11-14 11:25:01 +0100
commit381f465ca92f7c9759e85c1bfb4c95ceda26581e (patch)
treebffe031d19847d0d85be76c94a75358566a58338
parent1ef303f9f79020330bbd8e48ac652e8f2121a41b (diff)
downloadarm-trusted-firmware-381f465ca92f7c9759e85c1bfb4c95ceda26581e.tar.gz
fix(fconf): fix type error displaying disable_auth
disable_auth is defined as uint32_t and must be displayed as an unsigned int. lib/fconf/fconf_tbbr_getter.c: In function ‘fconf_populate_tbbr_dyn_config’: include/common/debug.h:46:41: error: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘uint32_t’ {aka ‘unsigned int’} [-Werror=format=] 46 | #define LOG_MARKER_WARNING "\x1e" /* 30 */ | ^~~~~~ include/common/debug.h:77:32: note: in expansion of macro ‘LOG_MARKER_WARNING’ 77 | # define WARN(...) tf_log(LOG_MARKER_WARNING __VA_ARGS__) | ^~~~~~~~~~~~~~~~~~ lib/fconf/fconf_tbbr_getter.c:47:17: note: in expansion of macro ‘WARN’ 47 | WARN("Invalid value for `%s` cell %d\n", | ^~~~ include/common/debug.h:48:41: error: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘uint32_t’ {aka ‘unsigned int’} [-Werror=format=] 48 | #define LOG_MARKER_VERBOSE "\x32" /* 50 */ | ^~~~~~ include/common/debug.h:58:32: note: in definition of macro ‘no_tf_log’ 58 | tf_log(fmt, ##__VA_ARGS__); \ | ^~~ include/common/debug.h:91:35: note: in expansion of macro ‘LOG_MARKER_VERBOSE’ 91 | # define VERBOSE(...) | no_tf_log(LOG_MARKER_VERBOSE __VA_ARGS__) | ^~~~~~~~~~~~~~~~~~ lib/fconf/fconf_tbbr_getter.c:74:9: note: in expansion of macro ‘VERBOSE’ 74 | VERBOSE("%s%s%s %d\n","FCONF: `tbbr.", "disable_auth", | ^~~~~~~ cc1: all warnings being treated as errors Change-Id: I0164ddfe511406cc1a8d014a368ef3e3c5f8cd27 Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
-rw-r--r--lib/fconf/fconf_tbbr_getter.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/fconf/fconf_tbbr_getter.c b/lib/fconf/fconf_tbbr_getter.c
index 6f043e645..c3b4b7e0e 100644
--- a/lib/fconf/fconf_tbbr_getter.c
+++ b/lib/fconf/fconf_tbbr_getter.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2021, Arm Limited. All rights reserved.
+ * Copyright (c) 2019-2022, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -44,8 +44,8 @@ int fconf_populate_tbbr_dyn_config(uintptr_t config)
/* Check if the value is boolean */
if ((tbbr_dyn_config.disable_auth != 0U) &&
(tbbr_dyn_config.disable_auth != 1U)) {
- WARN("Invalid value for `%s` cell %d\n",
- "disable_auth", tbbr_dyn_config.disable_auth);
+ WARN("Invalid value for `%s` cell %u\n",
+ "disable_auth", tbbr_dyn_config.disable_auth);
return -1;
}
@@ -71,7 +71,7 @@ int fconf_populate_tbbr_dyn_config(uintptr_t config)
}
tbbr_dyn_config.mbedtls_heap_size = val32;
- VERBOSE("%s%s%s %d\n", "FCONF: `tbbr.", "disable_auth",
+ VERBOSE("%s%s%s %u\n", "FCONF: `tbbr.", "disable_auth",
"` cell found with value =", tbbr_dyn_config.disable_auth);
VERBOSE("%s%s%s %p\n", "FCONF: `tbbr.", "mbedtls_heap_addr",
"` cell found with value =", tbbr_dyn_config.mbedtls_heap_addr);