1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-11 05:17:44 +03:00

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.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2022-05-10 14:12:57 +02:00
parent b9ce5cf9ca
commit 1ec7c15613

View File

@ -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__