summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/manager.h2
-rw-r--r--src/core/unit.c3
-rw-r--r--src/core/unit.h2
3 files changed, 5 insertions, 2 deletions
diff --git a/src/core/manager.h b/src/core/manager.h
index a0be2927f7..b9bd2099f8 100644
--- a/src/core/manager.h
+++ b/src/core/manager.h
@@ -301,6 +301,6 @@ void manager_undo_generators(Manager *m);
void manager_recheck_journal(Manager *m);
void manager_set_show_status(Manager *m, bool b);
-void manager_status_printf(Manager *m, bool ephemeral, const char *status, const char *format, ...);
+void manager_status_printf(Manager *m, bool ephemeral, const char *status, const char *format, ...) _printf_attr_(4,5);
void watch_init(Watch *w);
diff --git a/src/core/unit.c b/src/core/unit.c
index b4a4f8cd2e..7029b6443e 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -2576,9 +2576,12 @@ int unit_coldplug(Unit *u) {
return 0;
}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
void unit_status_printf(Unit *u, const char *status, const char *unit_status_msg_format) {
manager_status_printf(u->manager, false, status, unit_status_msg_format, unit_description(u));
}
+#pragma GCC diagnostic pop
bool unit_need_daemon_reload(Unit *u) {
_cleanup_strv_free_ char **t = NULL;
diff --git a/src/core/unit.h b/src/core/unit.h
index a086538c61..0f121e244e 100644
--- a/src/core/unit.h
+++ b/src/core/unit.h
@@ -528,7 +528,7 @@ int unit_add_node_link(Unit *u, const char *what, bool wants);
int unit_coldplug(Unit *u);
-void unit_status_printf(Unit *u, const char *status, const char *unit_status_msg_format);
+void unit_status_printf(Unit *u, const char *status, const char *unit_status_msg_format) _printf_attr_(3, 0);
bool unit_need_daemon_reload(Unit *u);