From 65cb873430d7bfcdf0452c76bf07f2ebbb4a21af Mon Sep 17 00:00:00 2001 From: Glynn Foster Date: Wed, 4 Jun 2003 12:53:46 +0000 Subject: [PATCH] Fix up some build warnings as reported by Ross Burton and his amazing gcc 2003-06-04 Glynn Foster * src/about.c, src/main.c, src/msg.c, src/progress.c, src/tree.c, src/util.c: Fix up some build warnings as reported by Ross Burton and his amazing gcc 3.3 techno machine. --- ChangeLog | 6 ++++++ src/about.c | 15 ++++----------- src/main.c | 15 +++++++-------- src/msg.c | 5 +++-- src/progress.c | 5 ++++- src/tree.c | 9 +++++---- src/util.c | 1 + 7 files changed, 30 insertions(+), 26 deletions(-) diff --git a/ChangeLog b/ChangeLog index f2a21cb..f52f26f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-06-04 Glynn Foster + + * src/about.c, src/main.c, src/msg.c, + src/progress.c, src/tree.c, src/util.c: Fix up some build warnings + as reported by Ross Burton and his amazing gcc 3.3 techno machine. + 2003-06-04 Jordi Mallach * src/main.c: Add a "no-c-format" xgettext header to unbreak po files diff --git a/src/about.c b/src/about.c index 182a816..ddc3325 100644 --- a/src/about.c +++ b/src/about.c @@ -27,8 +27,9 @@ #include "config.h" #include "zenity.h" #include "util.h" +#include #include -#include +#include #include #define GTK_RESPONSE_CREDITS 0 @@ -142,7 +143,7 @@ zenity_create_clothes (GtkWidget *canvas_board) pixbuf = gdk_pixbuf_new_from_file (pixbuf_path, NULL); canvas_item = gnome_canvas_item_new (GNOME_CANVAS_GROUP (GNOME_CANVAS (canvas_board)->root), - gnome_canvas_pixbuf_get_type (), + GNOME_TYPE_CANVAS_PIXBUF, "x", monk_clothes[i].x, "y", monk_clothes[i].y, "pixbuf", pixbuf, @@ -158,7 +159,6 @@ zenity_create_monk (void) { GtkWidget *canvas_board; GnomeCanvasItem *canvas_item; - GnomeCanvasGroup *root; GdkPixbuf *pixbuf; GdkColor color = { 0, 0xffff, 0xffff, 0xffff }; @@ -177,7 +177,7 @@ zenity_create_monk (void) pixbuf = gdk_pixbuf_new_from_file (ZENITY_CLOTHES_PATH "monk.png", NULL); canvas_item = gnome_canvas_item_new (GNOME_CANVAS_GROUP (GNOME_CANVAS (canvas_board)->root), - gnome_canvas_pixbuf_get_type (), + GNOME_TYPE_CANVAS_PIXBUF, "x", (ZENITY_CANVAS_X / 2.0)/2.0 + 10.0, "y", (ZENITY_CANVAS_Y / 2.0)/2.0 - 50.0, "pixbuf", pixbuf, @@ -368,13 +368,6 @@ zenity_about_update_translator_label (GtkWidget *label) g_string_free (string, TRUE); } -static void -zenity_about_dialog_credits_response (GtkWidget *widget, int response, gpointer data) -{ - gtk_widget_destroy (widget); - widget = NULL; -} - static void zenity_about_display_credits_dialog (void) { diff --git a/src/main.c b/src/main.c index 2792d53..23c4721 100644 --- a/src/main.c +++ b/src/main.c @@ -23,6 +23,7 @@ #include "config.h" #include "zenity.h" +#include #include #include @@ -986,10 +987,7 @@ zenity_free_parsing_options (void) { gint main (gint argc, gchar **argv) { - ZenityData *general; - ZenityCalendarData *cal_data; poptContext ctx; - gchar **args; gint nextopt, retval; bindtextdomain(GETTEXT_PACKAGE, GNOMELOCALEDIR); @@ -1020,11 +1018,12 @@ main (gint argc, gchar **argv) { gtk_init (&argc, &argv); /* - if (argc < 2) { - g_printerr (_("You must specify more arguments. See zenity --help for more details\n")); - zenity_free_parsing_options (); - exit (-1); - } */ + * if (argc < 2) { + * g_printerr (_("You must specify more arguments. See zenity --help for more details\n")); + * zenity_free_parsing_options (); + * exit (-1); + * } + */ switch (results->mode) { case MODE_CALENDAR: diff --git a/src/msg.c b/src/msg.c index 85b533e..22f5018 100644 --- a/src/msg.c +++ b/src/msg.c @@ -60,6 +60,9 @@ zenity_msg (ZenityData *data, ZenityMsgData *msg_data) break; default: + glade_dialog = NULL; + dialog = NULL; + text = NULL; g_assert_not_reached (); break; } @@ -83,8 +86,6 @@ zenity_msg (ZenityData *data, ZenityMsgData *msg_data) if (data->window_icon) zenity_util_set_window_icon (dialog, data->window_icon); else { - GdkPixbuf *pixbuf = NULL; - switch (msg_data->mode) { case ZENITY_MSG_WARNING: zenity_util_set_window_icon_from_stock (dialog, GTK_STOCK_DIALOG_WARNING); diff --git a/src/progress.c b/src/progress.c index dc0d74b..0fa8088 100644 --- a/src/progress.c +++ b/src/progress.c @@ -22,6 +22,10 @@ */ #include +#include +#include +#include +#include #include #include "zenity.h" #include "util.h" @@ -168,7 +172,6 @@ zenity_progress (ZenityData *data, ZenityProgressData *progress_data) GtkWidget *dialog; GtkWidget *text; GtkWidget *progress_bar; - guint input; zen_data = data; glade_dialog = zenity_util_load_glade_file ("zenity_progress_dialog"); diff --git a/src/tree.c b/src/tree.c index b94f634..f3e6377 100644 --- a/src/tree.c +++ b/src/tree.c @@ -45,6 +45,7 @@ zenity_tree_dialog_untoggle (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter if (g_value_get_boolean (&toggle_value)) gtk_list_store_set (GTK_LIST_STORE (model), iter, 0, FALSE, -1); + return FALSE; } static void @@ -479,14 +480,14 @@ zenity_tree_dialog_output (void) if (tmp->next != NULL) { /* FIXME: There must be a nicer way to do this. This is just arse */ if (strstr ((const gchar *) separator, (const gchar *) "\\n") != NULL) - g_printerr ("%s\n", tmp->data); + g_printerr ("%s\n", (gchar *) tmp->data); else if (strstr ((const gchar *) separator, (const gchar *) "\\t") != NULL) - g_printerr ("%s\t", tmp->data); + g_printerr ("%s\t", (gchar *) tmp->data); else - g_printerr ("%s%s", tmp->data, separator); + g_printerr ("%s%s", (gchar *) tmp->data, separator); } else - g_printerr ("%s\n", tmp->data); + g_printerr ("%s\n", (gchar *) tmp->data); } g_free (separator); diff --git a/src/util.c b/src/util.c index 2b3e8dc..7c8805a 100644 --- a/src/util.c +++ b/src/util.c @@ -30,6 +30,7 @@ #include #include #include +#include #include "config.h" #include "util.h" #include "zenity.h"