summaryrefslogtreecommitdiffstats
path: root/src/basic/log.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-05-10 14:12:57 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-05-11 16:47:40 +0200
commit1ec7c15613028c75cf160a56bec0642a99109551 (patch)
tree1cf1bf592852d73c233e601f24a7b53e6fc19729 /src/basic/log.h
parentOptionally call printf on LOG_MESSAGE() arguments (diff)
downloadsystemd-1ec7c15613028c75cf160a56bec0642a99109551.tar.xz
systemd-1ec7c15613028c75cf160a56bec0642a99109551.zip
Do LOG_MESSAGE_VERIFICATION in coverity runs
This should be enough to get reports if we screw up anywhere, coverity does analysis of printf format strings.
Diffstat (limited to '')
-rw-r--r--src/basic/log.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/log.h b/src/basic/log.h
index b03ca3ef21..7b89c4df63 100644
--- a/src/basic/log.h
+++ b/src/basic/log.h
@@ -300,7 +300,7 @@ bool log_on_console(void) _pure_;
/* Helper to wrap the main message in structured logging. The macro doesn't do much,
* except to provide visual grouping of the format string and its arguments. */
-#if LOG_MESSAGE_VERIFICATION
+#if LOG_MESSAGE_VERIFICATION || defined(__COVERITY__)
/* Do a fake formatting of the message string to let the scanner verify the arguments
* against the format message. */
# define LOG_MESSAGE(fmt, ...) "MESSAGE=%.0d" fmt, printf(fmt, ##__VA_ARGS__), ##__VA_ARGS__