Fix up some build warnings as reported by Ross Burton and his amazing gcc

2003-06-04  Glynn Foster  <glynn.foster@sun.com>

	* 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.
This commit is contained in:
Glynn Foster 2003-06-04 12:53:46 +00:00 committed by Glynn Foster
parent 3c6665af87
commit 65cb873430
7 changed files with 30 additions and 26 deletions

View File

@ -1,3 +1,9 @@
2003-06-04 Glynn Foster <glynn.foster@sun.com>
* 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 <jordi@sindominio.net> 2003-06-04 Jordi Mallach <jordi@sindominio.net>
* src/main.c: Add a "no-c-format" xgettext header to unbreak po files * src/main.c: Add a "no-c-format" xgettext header to unbreak po files

View File

@ -27,8 +27,9 @@
#include "config.h" #include "config.h"
#include "zenity.h" #include "zenity.h"
#include "util.h" #include "util.h"
#include <string.h>
#include <gdk/gdkkeysyms.h> #include <gdk/gdkkeysyms.h>
#include <libgnomecanvas/gnome-canvas.h> #include <libgnomecanvas/libgnomecanvas.h>
#include <glade/glade.h> #include <glade/glade.h>
#define GTK_RESPONSE_CREDITS 0 #define GTK_RESPONSE_CREDITS 0
@ -142,7 +143,7 @@ zenity_create_clothes (GtkWidget *canvas_board)
pixbuf = gdk_pixbuf_new_from_file (pixbuf_path, NULL); pixbuf = gdk_pixbuf_new_from_file (pixbuf_path, NULL);
canvas_item = gnome_canvas_item_new (GNOME_CANVAS_GROUP (GNOME_CANVAS (canvas_board)->root), 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, "x", monk_clothes[i].x,
"y", monk_clothes[i].y, "y", monk_clothes[i].y,
"pixbuf", pixbuf, "pixbuf", pixbuf,
@ -158,7 +159,6 @@ zenity_create_monk (void)
{ {
GtkWidget *canvas_board; GtkWidget *canvas_board;
GnomeCanvasItem *canvas_item; GnomeCanvasItem *canvas_item;
GnomeCanvasGroup *root;
GdkPixbuf *pixbuf; GdkPixbuf *pixbuf;
GdkColor color = { 0, 0xffff, 0xffff, 0xffff }; 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); 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), 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, "x", (ZENITY_CANVAS_X / 2.0)/2.0 + 10.0,
"y", (ZENITY_CANVAS_Y / 2.0)/2.0 - 50.0, "y", (ZENITY_CANVAS_Y / 2.0)/2.0 - 50.0,
"pixbuf", pixbuf, "pixbuf", pixbuf,
@ -368,13 +368,6 @@ zenity_about_update_translator_label (GtkWidget *label)
g_string_free (string, TRUE); 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 static void
zenity_about_display_credits_dialog (void) zenity_about_display_credits_dialog (void)
{ {

View File

@ -23,6 +23,7 @@
#include "config.h" #include "config.h"
#include "zenity.h" #include "zenity.h"
#include <stdlib.h>
#include <popt.h> #include <popt.h>
#include <langinfo.h> #include <langinfo.h>
@ -986,10 +987,7 @@ zenity_free_parsing_options (void) {
gint gint
main (gint argc, gchar **argv) { main (gint argc, gchar **argv) {
ZenityData *general;
ZenityCalendarData *cal_data;
poptContext ctx; poptContext ctx;
gchar **args;
gint nextopt, retval; gint nextopt, retval;
bindtextdomain(GETTEXT_PACKAGE, GNOMELOCALEDIR); bindtextdomain(GETTEXT_PACKAGE, GNOMELOCALEDIR);
@ -1020,11 +1018,12 @@ main (gint argc, gchar **argv) {
gtk_init (&argc, &argv); gtk_init (&argc, &argv);
/* /*
if (argc < 2) { * if (argc < 2) {
g_printerr (_("You must specify more arguments. See zenity --help for more details\n")); * g_printerr (_("You must specify more arguments. See zenity --help for more details\n"));
zenity_free_parsing_options (); * zenity_free_parsing_options ();
exit (-1); * exit (-1);
} */ * }
*/
switch (results->mode) { switch (results->mode) {
case MODE_CALENDAR: case MODE_CALENDAR:

View File

@ -60,6 +60,9 @@ zenity_msg (ZenityData *data, ZenityMsgData *msg_data)
break; break;
default: default:
glade_dialog = NULL;
dialog = NULL;
text = NULL;
g_assert_not_reached (); g_assert_not_reached ();
break; break;
} }
@ -83,8 +86,6 @@ zenity_msg (ZenityData *data, ZenityMsgData *msg_data)
if (data->window_icon) if (data->window_icon)
zenity_util_set_window_icon (dialog, data->window_icon); zenity_util_set_window_icon (dialog, data->window_icon);
else { else {
GdkPixbuf *pixbuf = NULL;
switch (msg_data->mode) { switch (msg_data->mode) {
case ZENITY_MSG_WARNING: case ZENITY_MSG_WARNING:
zenity_util_set_window_icon_from_stock (dialog, GTK_STOCK_DIALOG_WARNING); zenity_util_set_window_icon_from_stock (dialog, GTK_STOCK_DIALOG_WARNING);

View File

@ -22,6 +22,10 @@
*/ */
#include <stdio.h> #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
#include <signal.h>
#include <glade/glade.h> #include <glade/glade.h>
#include "zenity.h" #include "zenity.h"
#include "util.h" #include "util.h"
@ -168,7 +172,6 @@ zenity_progress (ZenityData *data, ZenityProgressData *progress_data)
GtkWidget *dialog; GtkWidget *dialog;
GtkWidget *text; GtkWidget *text;
GtkWidget *progress_bar; GtkWidget *progress_bar;
guint input;
zen_data = data; zen_data = data;
glade_dialog = zenity_util_load_glade_file ("zenity_progress_dialog"); glade_dialog = zenity_util_load_glade_file ("zenity_progress_dialog");

View File

@ -45,6 +45,7 @@ zenity_tree_dialog_untoggle (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter
if (g_value_get_boolean (&toggle_value)) if (g_value_get_boolean (&toggle_value))
gtk_list_store_set (GTK_LIST_STORE (model), iter, 0, FALSE, -1); gtk_list_store_set (GTK_LIST_STORE (model), iter, 0, FALSE, -1);
return FALSE;
} }
static void static void
@ -479,14 +480,14 @@ zenity_tree_dialog_output (void)
if (tmp->next != NULL) { if (tmp->next != NULL) {
/* FIXME: There must be a nicer way to do this. This is just arse */ /* FIXME: There must be a nicer way to do this. This is just arse */
if (strstr ((const gchar *) separator, (const gchar *) "\\n") != NULL) 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) else if (strstr ((const gchar *) separator, (const gchar *) "\\t") != NULL)
g_printerr ("%s\t", tmp->data); g_printerr ("%s\t", (gchar *) tmp->data);
else else
g_printerr ("%s%s", tmp->data, separator); g_printerr ("%s%s", (gchar *) tmp->data, separator);
} }
else else
g_printerr ("%s\n", tmp->data); g_printerr ("%s\n", (gchar *) tmp->data);
} }
g_free (separator); g_free (separator);

View File

@ -30,6 +30,7 @@
#include <stdio.h> #include <stdio.h>
#include <locale.h> #include <locale.h>
#include <errno.h> #include <errno.h>
#include <string.h>
#include "config.h" #include "config.h"
#include "util.h" #include "util.h"
#include "zenity.h" #include "zenity.h"