diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-03-15 22:38:59 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-03-15 22:38:59 +0800 |
commit | 58d0d111af5580051b4d9a5cbaef4d7b96fdcfa8 (patch) | |
tree | b6d3a47f051d5d81fcc2c7219ff60a5a77711f77 /mail | |
parent | ea52ab83fe121796a12a090ce81ba114d2c368ed (diff) | |
download | gsoc2013-evolution-58d0d111af5580051b4d9a5cbaef4d7b96fdcfa8.tar gsoc2013-evolution-58d0d111af5580051b4d9a5cbaef4d7b96fdcfa8.tar.gz gsoc2013-evolution-58d0d111af5580051b4d9a5cbaef4d7b96fdcfa8.tar.bz2 gsoc2013-evolution-58d0d111af5580051b4d9a5cbaef4d7b96fdcfa8.tar.lz gsoc2013-evolution-58d0d111af5580051b4d9a5cbaef4d7b96fdcfa8.tar.xz gsoc2013-evolution-58d0d111af5580051b4d9a5cbaef4d7b96fdcfa8.tar.zst gsoc2013-evolution-58d0d111af5580051b4d9a5cbaef4d7b96fdcfa8.zip |
Prevent future bugs like #612792.
Add G_GNUC_NULL_TERMINATED to EAlert functions with variable-length
parameter lists and drop the unnecessary "arg0" parameter so the
function attribute works correctly.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/em-utils.c | 7 | ||||
-rw-r--r-- | mail/em-utils.h | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/mail/em-utils.c b/mail/em-utils.c index d664a635cb..340ec58e64 100644 --- a/mail/em-utils.c +++ b/mail/em-utils.c @@ -117,7 +117,6 @@ em_utils_ask_open_many (GtkWindow *parent, * @parent: parent window * @promptkey: gconf key to check if we should prompt the user or not. * @tag: e_alert tag. - * @arg0: The first of a NULL terminated list of arguments for the error. * * Convenience function to query the user with a Yes/No dialog and a * "Do not show this dialog again" checkbox. If the user checks that @@ -127,7 +126,7 @@ em_utils_ask_open_many (GtkWindow *parent, * Returns %TRUE if the user clicks Yes or %FALSE otherwise. **/ gboolean -em_utils_prompt_user(GtkWindow *parent, const gchar *promptkey, const gchar *tag, const gchar *arg0, ...) +em_utils_prompt_user(GtkWindow *parent, const gchar *promptkey, const gchar *tag, ...) { GtkWidget *mbox, *check = NULL; va_list ap; @@ -139,8 +138,8 @@ em_utils_prompt_user(GtkWindow *parent, const gchar *promptkey, const gchar *tag && !gconf_client_get_bool(gconf, promptkey, NULL)) return TRUE; - va_start(ap, arg0); - alert = e_alert_new_valist (tag, arg0, ap); + va_start(ap, tag); + alert = e_alert_new_valist (tag, ap); va_end(ap); mbox = e_alert_dialog_new (parent, alert); diff --git a/mail/em-utils.h b/mail/em-utils.h index 4e3b95ef11..1bbde206ff 100644 --- a/mail/em-utils.h +++ b/mail/em-utils.h @@ -40,7 +40,7 @@ G_BEGIN_DECLS struct _EMFormat; gboolean em_utils_ask_open_many (GtkWindow *parent, gint how_many); -gboolean em_utils_prompt_user(GtkWindow *parent, const gchar *promptkey, const gchar *tag, const gchar *arg0, ...); +gboolean em_utils_prompt_user(GtkWindow *parent, const gchar *promptkey, const gchar *tag, ...); GPtrArray *em_utils_uids_copy (GPtrArray *uids); void em_utils_uids_free (GPtrArray *uids); |