diff options
Diffstat (limited to 'app-accessibility/gnome-mag/files/gnome-mag-0.15.9-magnifier-fix-warnings.patch')
-rw-r--r-- | app-accessibility/gnome-mag/files/gnome-mag-0.15.9-magnifier-fix-warnings.patch | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/app-accessibility/gnome-mag/files/gnome-mag-0.15.9-magnifier-fix-warnings.patch b/app-accessibility/gnome-mag/files/gnome-mag-0.15.9-magnifier-fix-warnings.patch new file mode 100644 index 000000000000..6771ee910f25 --- /dev/null +++ b/app-accessibility/gnome-mag/files/gnome-mag-0.15.9-magnifier-fix-warnings.patch @@ -0,0 +1,71 @@ +From: Romain Perier <mrpouet@gentoo.org> +Date: Fri, 15 Jan 2010 13:06:08 +0100 +Subject: Fix ugly warnings + +1)° g_object_get_data(GObject *, const gchar *) : needs a GObject * in first argument, + so because GdkPixbuf inherits from GObject, we've just to call G_OBJECT() macro. +2)° Invalid function prototype, so invalid function pointer. + Note: this callback just returns a value, so it's inlinable. +3)° Implicit declaration of 'gdk_pixbuf_set_option' due to missing GDK_PIXBUF_ENABLE_BACKEND + (see gdk-pixbuf/gdk-pixbuf-io.h for more details) +4)° event was useless (unused) + +--- + magnifier/magnifier.c | 9 +++++---- + magnifier/x11/gmag-graphical-server.c | 5 ++--- + 2 files changed, 7 insertions(+), 7 deletions(-) + +--- a/magnifier/magnifier.c ++++ b/magnifier/magnifier.c +@@ -304,8 +304,8 @@ magnifier_set_cursor_from_pixbuf (Magnifier *magnifier, + magnifier->priv->cursor = pixmap; + magnifier->priv->cursor_mask = mask; + +- xhot_string = g_object_get_data (cursor_pixbuf, "x_hot"); +- yhot_string = g_object_get_data (cursor_pixbuf, "y_hot"); ++ xhot_string = g_object_get_data (G_OBJECT(cursor_pixbuf), "x_hot"); ++ yhot_string = g_object_get_data (G_OBJECT(cursor_pixbuf), "y_hot"); + + if (xhot_string) + magnifier->cursor_hotspot.x = atoi (xhot_string); +@@ -1214,9 +1214,10 @@ magnifier_gobject_dispose (GObject *object) + BONOBO_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); + } + +-static ++static inline + CORBA_boolean +-impl_magnifier_support_colorblind_filters (Magnifier *magnifier) ++impl_magnifier_support_colorblind_filters (PortableServer_Servant _servant G_GNUC_UNUSED, ++ CORBA_Environment *ev G_GNUC_UNUSED) + { + #ifdef HAVE_COLORBLIND + return CORBA_TRUE; +--- a/magnifier/x11/gmag-graphical-server.c ++++ b/magnifier/x11/gmag-graphical-server.c +@@ -20,7 +20,7 @@ + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +- ++#define GDK_PIXBUF_ENABLE_BACKEND + #include "config.h" + #include "magnifier.h" + #include "magnifier-private.h" +@@ -48,7 +48,6 @@ + #include <stdlib.h> + + #include <glib.h> +- + #include <gdk/gdkx.h> + #include <gtk/gtk.h> + +@@ -439,7 +438,7 @@ gmag_gs_events_handler (GIOChannel *source, GIOCondition condition, + static gboolean + gmag_gs_use_damage () + { +- gint major, event, error; ++ gint major, error; + if (XQueryExtension ( + dpy, "DAMAGE", &major, &damage_event_base, &error) && + !g_getenv ("MAGNIFIER_IGNORE_DAMAGE")) { |