aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/simple_dialog.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-01-31 03:22:42 +0000
committerGuy Harris <guy@alum.mit.edu>2004-01-31 03:22:42 +0000
commit1980fa5dbf6e3aa953d8bd09d69e0700b74a56ad (patch)
tree1dda390f197eb0fd4dc3bf2e9b4e5b36a8162189 /gtk/simple_dialog.c
parent61e26a56bada54f651cb5c4110cae4b8f6548863 (diff)
Pass ESD_BTN_OK rather than NULL as a second argument to
"simple_dialog()"; NULL might be #defined to be a pointer expression on some platforms, causing compiler warnings (and, on platforms where a null pointer doesn't have all its bits 0, possibly causing misbehavior, although I don't think there are any such platforms on which Ethereal runs). Don't allow 0 as button mask argument to "simple_dialog()". Squelch a compiler warning. Report fatal problems as errors, not warnings. Report file I/O errors with "file_open_error_message()". Report file write errors (including those reported by "close()", e.g. some errors writing to an NFS server) when saving raw packet data to a file. svn path=/trunk/; revision=9915
Diffstat (limited to 'gtk/simple_dialog.c')
-rw-r--r--gtk/simple_dialog.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gtk/simple_dialog.c b/gtk/simple_dialog.c
index 256d63f1c2..ca115cb867 100644
--- a/gtk/simple_dialog.c
+++ b/gtk/simple_dialog.c
@@ -1,7 +1,7 @@
/* simple_dialog.c
* Simple message dialog box routines.
*
- * $Id: simple_dialog.c,v 1.19 2004/01/31 02:25:46 ulfl Exp $
+ * $Id: simple_dialog.c,v 1.20 2004/01/31 03:22:42 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -133,7 +133,6 @@ simple_dialog(gint type, gint btn_mask, gchar *msg_format, ...) {
/* Button row */
switch(btn_mask) {
- case(0):
case(ESD_BTN_OK):
bbox = dlg_button_row_new(GTK_STOCK_OK, NULL);
break;
@@ -145,6 +144,8 @@ simple_dialog(gint type, gint btn_mask, gchar *msg_format, ...) {
break;
default:
g_assert_not_reached();
+ bbox = NULL;
+ break;
}
gtk_container_add(GTK_CONTAINER(main_vb), bbox);
gtk_widget_show(bbox);