From 24b7307d9dd686cf12921cb342db8108aa1ce564 Mon Sep 17 00:00:00 2001 From: Matei Dibu Date: Fri, 29 Jul 2022 10:52:07 +0300 Subject: drivers/elog: Use format string clang shows the warning below: src/drivers/elog/elog.c:171:13: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] elog_debug(msg); ^~~ Found-by: clang (13.0.1) Change-Id: I3f8949f9ce0c4ef4823530c61c503b0883bb5efc Signed-off-by: Matei Dibu Reviewed-on: https://review.coreboot.org/c/coreboot/+/66262 Reviewed-by: Paul Menzel Tested-by: build bot (Jenkins) Reviewed-by: Matt DeVillier --- src/drivers/elog/elog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/drivers') diff --git a/src/drivers/elog/elog.c b/src/drivers/elog/elog.c index 37df182a8d..687e68b2f7 100644 --- a/src/drivers/elog/elog.c +++ b/src/drivers/elog/elog.c @@ -168,7 +168,7 @@ static void elog_debug_dump_buffer(const char *msg) if (!CONFIG(ELOG_DEBUG)) return; - elog_debug(msg); + elog_debug("%s", msg); rdev = mirror_dev_get(); -- cgit v1.2.3