tree-wide: mark log_struct with _printf_ and fix fallout
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 20 Apr 2017 18:15:28 +0000 (14:15 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 21 Apr 2017 17:37:04 +0000 (13:37 -0400)
commitba360bb05ce9b0bb86821fcdfebf66ccd9f7efd5
tree1eea995131e7f602d4d800330ffdafb5ec8b3171
parentc8304ba9027aa2bbca3aa9dfe9fcc951c16932e6
tree-wide: mark log_struct with _printf_ and fix fallout

log_struct takes multiple format strings, each one followed by arguments.
The _printf_ annotation is not sufficiently flexible to express this,
but we can still annotate the first format string, though not its
arguments (because their number is unknown).

With the annotation, the places which specified the message id or similar
as the first pattern cause a warning from -Wformat-nonliteral. This can
be trivially fixed by putting the MESSAGE= first.

This change will help find issues where a non-literal is erroneously used
as the pattern.
src/basic/log.h
src/core/execute.c
src/core/job.c
src/core/service.c
src/core/unit.c