diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-07-03 19:38:54 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-07-04 02:39:18 +0000 |
commit | c6f41124af3ecc1b9accb734504de03b474e5172 (patch) | |
tree | 2a31c4b478fff9ef1263043cf686a210d1514444 | |
parent | b8d96a45b763cd2e227b325dbc12e1f811b290b0 (diff) |
Do error checking on simple_error_message_box() calls and fix errors.
It's a printf-like routine, so give it the right declaration. Fix
errors that this finds.
Change-Id: I7e8c100ff9e16ba89743ce744cbf548aae705b77
Reviewed-on: https://code.wireshark.org/review/9487
Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r-- | file.c | 4 | ||||
-rw-r--r-- | ui/simple_dialog.h | 2 |
2 files changed, 3 insertions, 3 deletions
@@ -760,7 +760,7 @@ cf_read(capture_file *cf, gboolean reloading) case WTAP_ERR_DECOMPRESS: simple_error_message_box( - "The compressed capture file appears to be damaged or corrupt.\n", + "The compressed capture file appears to be damaged or corrupt.\n(%s)", err_info != NULL ? err_info : "no information supplied"); g_free(err_info); break; @@ -5043,7 +5043,7 @@ cf_open_failure_alert_box(const char *filename, int err, gchar *err_info, case WTAP_ERR_UNSUPPORTED: /* Seen only when opening a capture file for reading. */ simple_error_message_box( - "The file \"%s\" contains record data that Wireshark doesn't support.\n", + "The file \"%s\" contains record data that Wireshark doesn't support.\n" "(%s)", display_basename, err_info != NULL ? err_info : "no information supplied"); diff --git a/ui/simple_dialog.h b/ui/simple_dialog.h index cd42c7a074..ed4139a8a3 100644 --- a/ui/simple_dialog.h +++ b/ui/simple_dialog.h @@ -125,7 +125,7 @@ extern void vsimple_error_message_box(const char *msg_format, va_list ap); /* * Error alert box, taking a format and a list of arguments. */ -extern void simple_error_message_box(const char *msg_format, ...); +extern void simple_error_message_box(const char *msg_format, ...) G_GNUC_PRINTF(1, 2); #ifdef __cplusplus } |