diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-11-28 00:02:39 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-11-28 00:02:39 +0000 |
commit | a076a568387986c1d3ff0bc71192b64a56d5c2f3 (patch) | |
tree | 9e776ec58c602c27431f4808859597dc657a2f29 | |
parent | 49a11ca38e52ea66220ef62a16407a353f97962a (diff) |
Add GCC-style printf annotation to the routines that now take a format
string and format arguments, and fix issues warned about by that.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35044 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r-- | gtk/main.c | 2 | ||||
-rw-r--r-- | gtk/main_statusbar.c | 4 | ||||
-rw-r--r-- | main_statusbar.h | 9 |
3 files changed, 11 insertions, 4 deletions
diff --git a/gtk/main.c b/gtk/main.c index 47c2900a87..325d6134e1 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -884,7 +884,7 @@ tree_view_selection_changed_cb(GtkTreeSelection *sel, gpointer user_data _U_) * with no pseudo-field being used, but that might also * require special checks for -1 to be added. */ - statusbar_push_field_msg(""); + statusbar_push_field_msg("%s", ""); } } packet_hex_print(byte_view, byte_data, cfile.current_frame, finfo, diff --git a/gtk/main_statusbar.c b/gtk/main_statusbar.c index 3553004856..315c21b63c 100644 --- a/gtk/main_statusbar.c +++ b/gtk/main_statusbar.c @@ -102,6 +102,10 @@ static void status_expert_new(void); static gint flash_time; static gboolean flash_highlight = FALSE; +static void +statusbar_push_file_msg(const gchar *msg_format, ...) + G_GNUC_PRINTF(1, 2); + /* * Push a formatted message referring to file access onto the statusbar. */ diff --git a/main_statusbar.h b/main_statusbar.h index 92ecd27c44..a15aa4e158 100644 --- a/main_statusbar.h +++ b/main_statusbar.h @@ -34,7 +34,8 @@ void status_expert_update(void); * * @param msg_format The format string for the message */ -void statusbar_push_field_msg(const gchar *msg_format, ...); +void statusbar_push_field_msg(const gchar *msg_format, ...) + G_GNUC_PRINTF(1, 2); /** Pop a message referring to the currently-selected field off the statusbar. */ @@ -45,7 +46,8 @@ void statusbar_pop_field_msg(void); * * @param msg_format The format string for the message */ -void statusbar_push_filter_msg(const gchar *msg_format, ...); +void statusbar_push_filter_msg(const gchar *msg_format, ...) + G_GNUC_PRINTF(1, 2); /** Pop a message referring to the current filter off the statusbar. */ @@ -56,6 +58,7 @@ void statusbar_pop_filter_msg(void); * * @param msg_format The format string for the message */ -void statusbar_push_temporary_msg(const gchar *msg_format, ...); +void statusbar_push_temporary_msg(const gchar *msg_format, ...) + G_GNUC_PRINTF(1, 2); #endif /* __MAIN_STATUSBAR_H__ */ |