From 7640df6f1ef392d664d16aa4d49c67a24421adce Mon Sep 17 00:00:00 2001 From: Yann Gautier Date: Wed, 11 Dec 2024 15:59:22 +0100 Subject: [PATCH] fix(encrypt-fw): put build_msg under LOG_LEVEL flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In tools directory, contrary to other parts of TF-A code, LOG_LEVEL_NOTICE is 20, and LOG_LEVEL_ERROR is 10. If LOG_LEVEL is set to 10, which is the case if BUILD_INFO=0, then we can have this compilation warning: src/main.c:29:19: warning: ‘build_msg’ defined but not used [-Wunused-const-variable=] 29 | static const char build_msg[] = "Built : " __TIME__ ", " __DATE__; | ^~~~~~~~~ Avoid that by putting it under '#if LOG_LEVEL >= LOG_LEVEL_NOTICE'. Signed-off-by: Yann Gautier Change-Id: Ic724610d6df811fc889775dbd361087e0958d31e --- tools/encrypt_fw/src/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/encrypt_fw/src/main.c b/tools/encrypt_fw/src/main.c index 6e43e73a4..b6246f651 100644 --- a/tools/encrypt_fw/src/main.c +++ b/tools/encrypt_fw/src/main.c @@ -26,7 +26,9 @@ /* Global options */ +#if LOG_LEVEL >= LOG_LEVEL_NOTICE static const char build_msg[] = "Built : " __TIME__ ", " __DATE__; +#endif static char *key_algs_str[] = { [KEY_ALG_GCM] = "gcm",