[gtk+] Silence more compiler warnings
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Silence more compiler warnings
- Date: Sat, 12 Feb 2011 13:02:01 +0000 (UTC)
commit d05d92451604f7fd24c390571d1df6cdc9f31400
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Feb 12 07:59:25 2011 -0500
Silence more compiler warnings
tests/testcombo.c | 2 --
tests/testexpand.c | 10 ----------
tests/testfilechooser.c | 3 +--
tests/testgtk.c | 15 +++++++--------
tests/testnouiprint.c | 12 ++++--------
tests/testrecentchooser.c | 3 +--
6 files changed, 13 insertions(+), 32 deletions(-)
---
diff --git a/tests/testcombo.c b/tests/testcombo.c
index 0f7d5ce..b1bb7f9 100644
--- a/tests/testcombo.c
+++ b/tests/testcombo.c
@@ -35,7 +35,6 @@ create_color_pixbuf (const char *color)
int x;
int num;
- int rowstride;
guchar *pixels, *p;
if (!gdk_color_parse (color, &col))
@@ -45,7 +44,6 @@ create_color_pixbuf (const char *color)
FALSE, 8,
16, 16);
- rowstride = gdk_pixbuf_get_rowstride (pixbuf);
p = pixels = gdk_pixbuf_get_pixels (pixbuf);
num = gdk_pixbuf_get_width (pixbuf) *
diff --git a/tests/testexpand.c b/tests/testexpand.c
index e7f0d99..801b60e 100644
--- a/tests/testexpand.c
+++ b/tests/testexpand.c
@@ -26,11 +26,6 @@ static void
on_toggle_hexpand (GtkToggleButton *toggle,
void *data)
{
- GtkWidget *parent;
-
- /* get the event box with color set on it */
- parent = gtk_widget_get_parent (gtk_widget_get_parent (GTK_WIDGET (toggle)));
-
g_object_set (toggle,
"hexpand", gtk_toggle_button_get_active (toggle),
NULL);
@@ -40,11 +35,6 @@ static void
on_toggle_vexpand (GtkToggleButton *toggle,
void *data)
{
- GtkWidget *parent;
-
- /* get the event box with color set on it */
- parent = gtk_widget_get_parent (gtk_widget_get_parent (GTK_WIDGET (toggle)));
-
g_object_set (toggle,
"vexpand", gtk_toggle_button_get_active (toggle),
NULL);
diff --git a/tests/testfilechooser.c b/tests/testfilechooser.c
index dcefbc1..b64c381 100644
--- a/tests/testfilechooser.c
+++ b/tests/testfilechooser.c
@@ -481,7 +481,6 @@ main (int argc, char **argv)
GtkWidget *vbbox;
GtkWidget *button;
GtkWidget *dialog;
- GtkWidget *prop_editor;
GtkWidget *extra;
GtkFileFilter *filter;
GtkWidget *preview_vbox;
@@ -640,7 +639,7 @@ main (int argc, char **argv)
/* Extra controls for manipulating the test environment
*/
- prop_editor = create_prop_editor (G_OBJECT (dialog), GTK_TYPE_FILE_CHOOSER);
+ create_prop_editor (G_OBJECT (dialog), GTK_TYPE_FILE_CHOOSER);
control_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
diff --git a/tests/testgtk.c b/tests/testgtk.c
index def6ded..b704c6f 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -8841,7 +8841,6 @@ snapshot_widget (GtkButton *button,
{
GtkWidget *widget = GTK_WIDGET (button);
GdkDevice *device;
- gint failure;
device = gtk_get_current_event_device ();
if (device == NULL)
@@ -8856,13 +8855,13 @@ snapshot_widget (GtkButton *button,
data->cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget),
GDK_TARGET);
- failure = gdk_device_grab (device,
- gtk_widget_get_window (widget),
- GDK_OWNERSHIP_APPLICATION,
- TRUE,
- GDK_BUTTON_RELEASE_MASK,
- data->cursor,
- GDK_CURRENT_TIME);
+ gdk_device_grab (device,
+ gtk_widget_get_window (widget),
+ GDK_OWNERSHIP_APPLICATION,
+ TRUE,
+ GDK_BUTTON_RELEASE_MASK,
+ data->cursor,
+ GDK_CURRENT_TIME);
g_signal_connect (button, "event",
G_CALLBACK (snapshot_widget_event), data);
diff --git a/tests/testnouiprint.c b/tests/testnouiprint.c
index 0dcc489..bde1a02 100644
--- a/tests/testnouiprint.c
+++ b/tests/testnouiprint.c
@@ -71,7 +71,7 @@ draw_page (GtkPrintOperation *operation,
/* Font Fill */
cairo_set_source_rgb (cr, 0, 0.0, 1.0);
cairo_fill (cr);
-
+
g_object_unref (layout);
}
@@ -79,24 +79,20 @@ draw_page (GtkPrintOperation *operation,
int
main (int argc, char **argv)
{
- GMainLoop *loop;
GtkPrintOperation *print;
- GtkPrintOperationResult res;
GtkPrintSettings *settings;
- g_type_init ();
-
- loop = g_main_loop_new (NULL, TRUE);
+ g_type_init ();
settings = gtk_print_settings_new ();
/* gtk_print_settings_set_printer (settings, "printer"); */
-
+
print = gtk_print_operation_new ();
gtk_print_operation_set_print_settings (print, settings);
gtk_print_operation_set_n_pages (print, 1);
gtk_print_operation_set_unit (print, GTK_UNIT_MM);
g_signal_connect (print, "draw_page", G_CALLBACK (draw_page), NULL);
- res = gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT, NULL, NULL);
+ gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT, NULL, NULL);
return 0;
}
diff --git a/tests/testrecentchooser.c b/tests/testrecentchooser.c
index 4761583..d31f0f0 100644
--- a/tests/testrecentchooser.c
+++ b/tests/testrecentchooser.c
@@ -111,7 +111,6 @@ main (int argc,
GtkWidget *vbbox;
GtkWidget *button;
GtkWidget *dialog;
- GtkWidget *prop_editor;
GtkRecentFilter *filter;
gint i;
gboolean multiple = FALSE;
@@ -172,7 +171,7 @@ main (int argc,
gtk_widget_show_all (dialog);
- prop_editor = create_prop_editor (G_OBJECT (dialog), GTK_TYPE_RECENT_CHOOSER);
+ create_prop_editor (G_OBJECT (dialog), GTK_TYPE_RECENT_CHOOSER);
control_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]