diff options
author | Rosen Penev <rosenp@gmail.com> | 2020-04-07 20:32:43 -0700 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2020-04-08 16:14:44 -0500 |
commit | 2acda158ef4ace7958c0f8ccb68bf9f331f5974f (patch) | |
tree | 31d5ed449f81ad0e28061f6132f9e0c2ee2e9e1d | |
parent | 36f962a4f0e64139e41852c39b9a69c79c0cdcbd (diff) | |
download | iwd-2acda158ef4ace7958c0f8ccb68bf9f331f5974f.tar.gz |
client: apply format attribute to two functions
Clang was able to find these extra ones.
-rw-r--r-- | client/agent.c | 2 | ||||
-rw-r--r-- | client/display.h | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/client/agent.c b/client/agent.c index b804b50d3..157b61c07 100644 --- a/client/agent.c +++ b/client/agent.c @@ -303,7 +303,7 @@ static struct l_dbus_message *request_user_password_method_call( username_prompt = l_strdup_printf(COLOR_BLUE PROMPT_USERNAME " " COLOR_OFF "%s\n", username); - display(username_prompt); + display("%s", username_prompt); l_free(username_prompt); display_agent_prompt(PROMPT_PASSWORD, true); diff --git a/client/display.h b/client/display.h index 2b0d8d7ce..fbae0c67d 100644 --- a/client/display.h +++ b/client/display.h @@ -32,8 +32,10 @@ struct command_family; #define CLEAR_SCREEN "\033[2J" #define MARGIN " " -void display(const char *format, ...); -void display_table_header(const char *caption, const char *fmt, ...); +void display(const char *format, ...) + __attribute__((format(printf, 1, 2))); +void display_table_header(const char *caption, const char *fmt, ...) + __attribute__((format(printf, 2, 3))); void display_table_footer(void); void display_error(const char *error); void display_command_line(const char *command_family, |