diff options
author | rillig <rillig@pkgsrc.org> | 2008-12-15 11:17:47 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2008-12-15 11:17:47 +0000 |
commit | 9bbf8ebe00174a5437c5dd469a5fb8b68c8bb3fd (patch) | |
tree | 62156973a87d0449f053aa6d122733f6d192e0cb /x11/gtk2/patches | |
parent | 99e47f2630984bfd3535c29d81430c5f442c68cf (diff) | |
download | pkgsrc-9bbf8ebe00174a5437c5dd469a5fb8b68c8bb3fd.tar.gz |
Added two patches so that this package passes gcc with the option
-Werror=int-to-pointer-cast.
Diffstat (limited to 'x11/gtk2/patches')
-rw-r--r-- | x11/gtk2/patches/patch-gb | 15 | ||||
-rw-r--r-- | x11/gtk2/patches/patch-ob | 34 |
2 files changed, 49 insertions, 0 deletions
diff --git a/x11/gtk2/patches/patch-gb b/x11/gtk2/patches/patch-gb new file mode 100644 index 00000000000..9ff760db36c --- /dev/null +++ b/x11/gtk2/patches/patch-gb @@ -0,0 +1,15 @@ +$NetBSD: patch-gb,v 1.1 2008/12/15 11:17:47 rillig Exp $ + +Prevent an int-to-pointer-cast warning from gcc. + +--- modules/other/gail/gailbutton.c.orig 2008-10-17 06:06:24.000000000 +0200 ++++ modules/other/gail/gailbutton.c 2008-12-15 11:34:12.000000000 +0100 +@@ -475,7 +475,7 @@ gail_button_do_action (AtkAction *action + { + button->action_queue = g_queue_new (); + } +- g_queue_push_head (button->action_queue, (gpointer) i); ++ g_queue_push_head (button->action_queue, (gpointer) (gssize) i); + if (!button->action_idle_handler) + button->action_idle_handler = gdk_threads_add_idle (idle_do_action, button); + break; diff --git a/x11/gtk2/patches/patch-ob b/x11/gtk2/patches/patch-ob new file mode 100644 index 00000000000..ad3c2836c7d --- /dev/null +++ b/x11/gtk2/patches/patch-ob @@ -0,0 +1,34 @@ +$NetBSD: patch-ob,v 1.1 2008/12/15 11:17:47 rillig Exp $ + +Prevent an int-to-pointer-cast warning from gcc. The specification says +about gsize that "This type is wide enough to hold the numeric value of +a pointer", so there's no additional loss in converting a glong first to +gssize and later to (void *). + +--- gtk/tests/object.c.orig 2008-10-17 06:06:13.000000000 +0200 ++++ gtk/tests/object.c 2008-12-15 11:27:59.000000000 +0100 +@@ -199,19 +199,19 @@ value_as_pointer (GValue *value) + if (g_value_fits_pointer (value)) + return g_value_peek_pointer (value); + if (G_VALUE_HOLDS_BOOLEAN (value)) +- return (void*) g_value_get_boolean (value); ++ return (void*) (gsize) g_value_get_boolean (value); + if (G_VALUE_HOLDS_CHAR (value)) + return (void*) (gssize) g_value_get_char (value); + if (G_VALUE_HOLDS_UCHAR (value)) + return (void*) (gsize) g_value_get_uchar (value); + if (G_VALUE_HOLDS_INT (value)) +- return (void*) g_value_get_int (value); ++ return (void*) (gssize) g_value_get_int (value); + if (G_VALUE_HOLDS_UINT (value)) +- return (void*) g_value_get_uint (value); ++ return (void*) (gsize) g_value_get_uint (value); + if (G_VALUE_HOLDS_LONG (value)) +- return (void*) g_value_get_long (value); ++ return (void*) (gssize) g_value_get_long (value); + if (G_VALUE_HOLDS_ULONG (value)) +- return (void*) g_value_get_ulong (value); ++ return (void*) (gsize) g_value_get_ulong (value); + if (G_VALUE_HOLDS_FLOAT (value)) + return (void*) (gssize) g_value_get_float (value); + if (G_VALUE_HOLDS_DOUBLE (value)) |