aboutsummaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-01-01 23:25:49 +0000
committerGuy Harris <guy@alum.mit.edu>2005-01-01 23:25:49 +0000
commitf7a9294fabb89a7f48fa98a8dfaf9f48102710fe (patch)
tree75bf77fd2696dc1e7e45b66d0650d53c506950c3 /gtk
parent7abf048c5fe4e602937b68aabe4f5906d8729413 (diff)
downloadwireshark-f7a9294fabb89a7f48fa98a8dfaf9f48102710fe.tar.gz
wireshark-f7a9294fabb89a7f48fa98a8dfaf9f48102710fe.tar.bz2
wireshark-f7a9294fabb89a7f48fa98a8dfaf9f48102710fe.zip
Cast away the constness of the geom_name argument to
"window_new_with_geom()" - there's no way to tell the compiler that we're not going to be modifying it, but we aren't. The right way to check whether a pointer is null and get a Boolean is to test it against null, not to cast it to a Boolean type - as Boolean types in C89/C90, at least, are just integral types, that cast might just throw away the upper 32 bits; that probably yields the results you want, but the compiler might well justifiably warn about that on an LP64 platform. svn path=/trunk/; revision=12918
Diffstat (limited to 'gtk')
-rw-r--r--gtk/ui_util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/ui_util.c b/gtk/ui_util.c
index d350ab7dd1..0bb9d3513a 100644
--- a/gtk/ui_util.c
+++ b/gtk/ui_util.c
@@ -167,7 +167,7 @@ window_new_with_geom(GtkWindowType type, const gchar *title, const gchar *geom_n
window_geometry_t geom;
GtkWidget *win = window_new(type, title);
- OBJECT_SET_DATA(win, WINDOW_GEOM_KEY, geom_name);
+ OBJECT_SET_DATA(win, WINDOW_GEOM_KEY, (gpointer)geom_name);
/* do we have a previously saved size and position of this window? */
if(geom_name) {
@@ -984,7 +984,7 @@ simple_list_new(gint cols, gchar **titles) {
G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
plugins_list = tree_view_new(GTK_TREE_MODEL(store));
g_object_unref(G_OBJECT(store));
- gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(plugins_list), (gboolean) titles);
+ gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(plugins_list), (titles != NULL));
for(i=0; i<cols; i++) {
renderer = gtk_cell_renderer_text_new();
column = gtk_tree_view_column_new_with_attributes(titles ? titles[i] : "", renderer,