From c86e12e6dc1906fe93d324b7e16bae043d53f22b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20=C3=85strand?= Date: Fri, 5 Sep 2003 08:34:19 +0000 Subject: [PATCH] Fixed GCC compiler warnings. git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@463 423420c4-83ab-492f-b58f-81f9feb106b5 --- ewmhints.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/ewmhints.c b/ewmhints.c index 5453c4f..edcc108 100644 --- a/ewmhints.c +++ b/ewmhints.c @@ -90,11 +90,11 @@ static int get_current_desktop(void) { unsigned long nitems_return; - uint32 *prop_return; + unsigned char *prop_return; int current_desktop; if (get_property_value("_NET_CURRENT_DESKTOP", 1, &nitems_return, - (unsigned char **) &prop_return) < 0) + &prop_return) < 0) return (-1); if (nitems_return != 1) @@ -118,7 +118,8 @@ get_current_workarea(uint32 * x, uint32 * y, uint32 * width, uint32 * height) { int current_desktop; unsigned long nitems_return; - uint32 *prop_return; + unsigned char *prop_return; + uint32 *return_words; const uint32 net_workarea_x_offset = 0; const uint32 net_workarea_y_offset = 1; const uint32 net_workarea_width_offset = 2; @@ -126,7 +127,7 @@ get_current_workarea(uint32 * x, uint32 * y, uint32 * width, uint32 * height) const uint32 max_prop_length = 32 * 4; /* Max 32 desktops */ if (get_property_value("_NET_WORKAREA", max_prop_length, &nitems_return, - (unsigned char **) &prop_return) < 0) + &prop_return) < 0) return (-1); if (nitems_return % 4) @@ -140,10 +141,12 @@ get_current_workarea(uint32 * x, uint32 * y, uint32 * width, uint32 * height) if (current_desktop < 0) return -1; - *x = prop_return[current_desktop * 4 + net_workarea_x_offset]; - *y = prop_return[current_desktop * 4 + net_workarea_y_offset]; - *width = prop_return[current_desktop * 4 + net_workarea_width_offset]; - *height = prop_return[current_desktop * 4 + net_workarea_height_offset]; + return_words = (uint32 *)prop_return; + + *x = return_words[current_desktop * 4 + net_workarea_x_offset]; + *y = return_words[current_desktop * 4 + net_workarea_y_offset]; + *width = return_words[current_desktop * 4 + net_workarea_width_offset]; + *height = return_words[current_desktop * 4 + net_workarea_height_offset]; XFree(prop_return);