[gnome-power-manager] Fix pointer alignment, to build on sparc.



commit cd1b1020832452553ae53edfbe043a2fc9a1bc16
Author: Martin Pitt <martin pitt ubuntu com>
Date:   Wed Jul 22 19:15:12 2009 +0200

    Fix pointer alignment, to build on sparc.
    
    gpm-brightness-xrandr.c fails to build on sparc, due to a passing a char* as
    guint*, which doesn't have the right alignment. This is caught by gcc, and
    result s in a build failure.
    
    http://bugzilla.gnome.org/show_bug.cgi?id=589404

 src/gpm-brightness-xrandr.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/gpm-brightness-xrandr.c b/src/gpm-brightness-xrandr.c
index 72526a8..7cffe96 100644
--- a/src/gpm-brightness-xrandr.c
+++ b/src/gpm-brightness-xrandr.c
@@ -91,7 +91,7 @@ gpm_brightness_xrandr_output_get_internal (GpmBrightnessXRandR *brightness, RROu
 {
 	unsigned long nitems;
 	unsigned long bytes_after;
-	unsigned char *prop;
+	guint *prop;
 	Atom actual_type;
 	int actual_format;
 	gboolean ret = FALSE;
@@ -101,7 +101,7 @@ gpm_brightness_xrandr_output_get_internal (GpmBrightnessXRandR *brightness, RROu
 	if (XRRGetOutputProperty (brightness->priv->dpy, output, brightness->priv->backlight,
 				  0, 4, False, False, None,
 				  &actual_type, &actual_format,
-				  &nitems, &bytes_after, &prop) != Success) {
+				  &nitems, &bytes_after, ((unsigned char **)&prop)) != Success) {
 		egg_debug ("failed to get property");
 		return FALSE;
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]