[maemo-commits] [maemo-commits] r18005 - in projects/haf/trunk/libmatchbox2: . matchbox/comp-mgr matchbox/core matchbox/theme-engines
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Fri Apr 3 15:30:29 EEST 2009
- Previous message: [maemo-commits] r18004 - in projects/haf/trunk/libmatchbox2: . matchbox/core
- Next message: [maemo-commits] r18006 - projects/haf/trunk/libmatchbox2/matchbox/core
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: kihamala Date: 2009-04-03 15:30:26 +0300 (Fri, 03 Apr 2009) New Revision: 18005 Modified: projects/haf/trunk/libmatchbox2/ChangeLog projects/haf/trunk/libmatchbox2/configure.ac projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-window.c projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-decor.c projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-main-context.c projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-root-window.c projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-types.h projects/haf/trunk/libmatchbox2/matchbox/core/xas.c projects/haf/trunk/libmatchbox2/matchbox/theme-engines/mb-wm-theme.c Log: make libmatchbox2 warning-free Modified: projects/haf/trunk/libmatchbox2/ChangeLog =================================================================== --- projects/haf/trunk/libmatchbox2/ChangeLog 2009-04-03 11:16:40 UTC (rev 18004) +++ projects/haf/trunk/libmatchbox2/ChangeLog 2009-04-03 12:30:26 UTC (rev 18005) @@ -1,5 +1,8 @@ 2009-04-03 Kimmo Hämäläinen <kimmo.hamalainen at nokia.com> + Made libmatchbox2 warning-free. + + * configure.ac: Add -Werror compilation flag. * matchbox/core/mb-window-manager.h: Remove unused return value from the client_responding handler type. * matchbox/core/mb-wm-client.c (mb_wm_client_init): According to Mox's Modified: projects/haf/trunk/libmatchbox2/configure.ac =================================================================== --- projects/haf/trunk/libmatchbox2/configure.ac 2009-04-03 11:16:40 UTC (rev 18004) +++ projects/haf/trunk/libmatchbox2/configure.ac 2009-04-03 12:30:26 UTC (rev 18005) @@ -289,7 +289,7 @@ MBWM_THEME_BUILDDIR='$(top_builddir)/matchbox/theme-engines' MBWM_COMPMGR_BUILDDIR='$(top_builddir)/matchbox/comp-mgr' # -Wall should be turned on later -MBWM_CFLAGS="$MBWM_CFLAGS $MBWM_DEBUG_CFLAGS $XFIXES_CFLAGS $XEXT_CFLAGS $XCURSOR_CFLAGS -g -O0" +MBWM_CFLAGS="$MBWM_CFLAGS $MBWM_DEBUG_CFLAGS $XFIXES_CFLAGS $XEXT_CFLAGS $XCURSOR_CFLAGS -g -O0 -Werror" MBWM_LIBS="$MBWM_LIBS $XFIXES_LIBS $XEXT_LIBS $XCURSOR_LIBS $MBWM_EXTRA_LIBS -O0" AC_SUBST([MBWM_CFLAGS]) Modified: projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c =================================================================== --- projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c 2009-04-03 11:16:40 UTC (rev 18004) +++ projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c 2009-04-03 12:30:26 UTC (rev 18005) @@ -176,11 +176,7 @@ MBWMCompMgrClutterClient *cclient = MB_WM_COMP_MGR_CLUTTER_CLIENT(client); MBWindowManagerClient *wm_client = client->wm_client; MBWindowManager *wm = client->wm; - MBGeometry geom; Window xwin; - Window root; - int x, y; - unsigned int w, h, bw, depth; #ifdef HAVE_XEXT /* Stuff we need for shaped windows */ XRectangle *shp_rect; @@ -770,7 +766,6 @@ MBWindowManagerClient * wm_client = client->wm_client; MBWMCompMgrClutterClient * cclient = MB_WM_COMP_MGR_CLUTTER_CLIENT (client); Bool fullscreen; - MBWMClientType ctype = MB_WM_CLIENT_CLIENT_TYPE (wm_client); /* * We used to release the backing pixmap here, but there seems no point @@ -976,7 +971,9 @@ MBWMCompMgrClutterClient * cclient = MB_WM_COMP_MGR_CLUTTER_CLIENT(client); MBWindowManager * wm = client->wm; ClutterActor * texture; +#if SGX_CORRUPTION_WORKAROUND MBWMClientType ctype = MB_WM_CLIENT_CLIENT_TYPE (c); +#endif char actor_name[64]; cclient->priv->fullscreen = mb_wm_client_window_is_state_set ( Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c =================================================================== --- projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c 2009-04-03 11:16:40 UTC (rev 18004) +++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c 2009-04-03 12:30:26 UTC (rev 18005) @@ -564,18 +564,18 @@ int format; unsigned long items; unsigned long left; - char *theme_path; + unsigned char *theme_path; XGetWindowProperty (wm->xdpy, wm->root_win->xwindow, xev->atom, 0, 8192, False, XA_STRING, &type, &format, &items, &left, - (unsigned char **)&theme_path); + &theme_path); if (!type || !items) return True; - mb_wm_set_theme_from_path (wm, theme_path); + mb_wm_set_theme_from_path (wm, (char*)theme_path); XFree (theme_path); } Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-window.c =================================================================== --- projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-window.c 2009-04-03 11:16:40 UTC (rev 18004) +++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-window.c 2009-04-03 12:30:26 UTC (rev 18005) @@ -168,12 +168,12 @@ * pointer to where the next icon might be in the data */ static unsigned long * -icon_from_net_wm_icon (unsigned long * data, MBWMRgbaIcon ** mb_icon) +icon_from_net_wm_icon (unsigned long * data, void ** mb_icon) { MBWMRgbaIcon * icon = mb_wm_rgba_icon_new (); size_t byte_len; - *mb_icon = icon; + *((MBWMRgbaIcon**)mb_icon) = icon; if (!icon) return data; @@ -205,7 +205,8 @@ { MBWMCookie cookies[N_COOKIES] = {0}; MBWindowManager *wm = win->wm; - Atom actual_type_return, *result_atom = NULL; + Atom actual_type_return; + unsigned char *result_atom = NULL; int actual_format_return; unsigned long nitems_return; unsigned long bytes_after_return; @@ -423,7 +424,7 @@ &actual_format_return, &nitems_return, &bytes_after_return, - (unsigned char **)&result_atom, + &result_atom, &x_error_code); if (x_error_code @@ -475,7 +476,7 @@ &actual_format_return, &nitems_return, &bytes_after_return, - (unsigned char **)&result_atom, + &result_atom, &x_error_code); if (x_error_code @@ -492,43 +493,34 @@ else { int i; + Atom *a = (Atom*)result_atom; win->ewmh_state = 0; for (i = 0; i < nitems_return; ++i) { - if (result_atom[i] == wm->atoms[MBWM_ATOM_NET_WM_STATE_MODAL]) + if (a[i] == wm->atoms[MBWM_ATOM_NET_WM_STATE_MODAL]) win->ewmh_state |= MBWMClientWindowEWMHStateModal; - else if (result_atom[i] == - wm->atoms[MBWM_ATOM_NET_WM_STATE_STICKY]) + else if (a[i] == wm->atoms[MBWM_ATOM_NET_WM_STATE_STICKY]) win->ewmh_state |= MBWMClientWindowEWMHStateSticky; - else if (result_atom[i] == - wm->atoms[MBWM_ATOM_NET_WM_STATE_MAXIMIZED_VERT]) + else if (a[i] == wm->atoms[MBWM_ATOM_NET_WM_STATE_MAXIMIZED_VERT]) win->ewmh_state |= MBWMClientWindowEWMHStateMaximisedVert; - else if (result_atom[i] == - wm->atoms[MBWM_ATOM_NET_WM_STATE_MAXIMIZED_HORZ]) + else if (a[i] == wm->atoms[MBWM_ATOM_NET_WM_STATE_MAXIMIZED_HORZ]) win->ewmh_state |= MBWMClientWindowEWMHStateMaximisedHorz; - else if (result_atom[i] == - wm->atoms[MBWM_ATOM_NET_WM_STATE_SHADED]) + else if (a[i] == wm->atoms[MBWM_ATOM_NET_WM_STATE_SHADED]) win->ewmh_state |= MBWMClientWindowEWMHStateShaded; - else if (result_atom[i] == - wm->atoms[MBWM_ATOM_NET_WM_STATE_SKIP_TASKBAR]) + else if (a[i] == wm->atoms[MBWM_ATOM_NET_WM_STATE_SKIP_TASKBAR]) win->ewmh_state |= MBWMClientWindowEWMHStateSkipTaskbar; - else if (result_atom[i] == - wm->atoms[MBWM_ATOM_NET_WM_STATE_SKIP_PAGER]) + else if (a[i] == wm->atoms[MBWM_ATOM_NET_WM_STATE_SKIP_PAGER]) win->ewmh_state |= MBWMClientWindowEWMHStateSkipPager; - else if (result_atom[i] == - wm->atoms[MBWM_ATOM_NET_WM_STATE_HIDDEN]) + else if (a[i] == wm->atoms[MBWM_ATOM_NET_WM_STATE_HIDDEN]) win->ewmh_state |= MBWMClientWindowEWMHStateHidden; - else if (result_atom[i] == - wm->atoms[MBWM_ATOM_NET_WM_STATE_FULLSCREEN]) + else if (a[i] == wm->atoms[MBWM_ATOM_NET_WM_STATE_FULLSCREEN]) win->ewmh_state |= MBWMClientWindowEWMHStateFullscreen; - else if (result_atom[i] == - wm->atoms[MBWM_ATOM_NET_WM_STATE_ABOVE]) + else if (a[i] == wm->atoms[MBWM_ATOM_NET_WM_STATE_ABOVE]) win->ewmh_state |= MBWMClientWindowEWMHStateAbove; - else if (result_atom[i] == - wm->atoms[MBWM_ATOM_NET_WM_STATE_BELOW]) + else if (a[i] == wm->atoms[MBWM_ATOM_NET_WM_STATE_BELOW]) win->ewmh_state |= MBWMClientWindowEWMHStateBelow; - else if (result_atom[i] == + else if (a[i] == wm->atoms[MBWM_ATOM_NET_WM_STATE_DEMANDS_ATTENTION]) win->ewmh_state |= MBWMClientWindowEWMHStateDemandsAttention; } @@ -638,7 +630,7 @@ { char *newline; - while (newline = index (win->name, '\n')) + while ((newline = index (win->name, '\n'))) *newline = ' '; } @@ -847,7 +839,7 @@ if (props_req & MBWM_WINDOW_PROP_NET_PID) { - unsigned int *pid = NULL; + unsigned char *pid = NULL; mb_wm_property_reply (wm, cookies[COOKIE_WIN_PID], @@ -855,7 +847,7 @@ &actual_format_return, &nitems_return, &bytes_after_return, - (unsigned char **)&pid, + &pid, &x_error_code); if (x_error_code @@ -880,7 +872,7 @@ if (props_req & MBWM_WINDOW_PROP_CM_TRANSLUCENCY) { - int *translucency = NULL; + unsigned char *translucency = NULL; mb_wm_property_reply (wm, cookies[COOKIE_WIN_CM_TRANSLUCENCY], @@ -888,7 +880,7 @@ &actual_format_return, &nitems_return, &bytes_after_return, - (unsigned char **)&translucency, + &translucency, &x_error_code); if (x_error_code @@ -904,7 +896,7 @@ } else { - win->translucency = *translucency; + win->translucency = (int)*translucency; MBWM_DBG("@@@ translucency %d @@@", win->translucency); } @@ -916,7 +908,7 @@ if (props_req & MBWM_WINDOW_PROP_NET_ICON) { - unsigned long *icons = NULL; + unsigned char *icons = NULL; mb_wm_property_reply (wm, cookies[COOKIE_WIN_ICON], @@ -924,7 +916,7 @@ &actual_format_return, &nitems_return, &bytes_after_return, - (unsigned char **)&icons, + &icons, &x_error_code); if (x_error_code @@ -941,8 +933,8 @@ { MBWMList *l = win->icons; MBWMList *list_end = NULL; - unsigned long *p = icons; - unsigned long *p_end = icons + nitems_return; + unsigned long *p = (unsigned long *)icons; + unsigned long *p_end = (unsigned long *)icons + nitems_return; while (l) { @@ -956,7 +948,7 @@ while (p < p_end) { l = mb_wm_util_malloc0 (sizeof (MBWMList)); - p = icon_from_net_wm_icon (p, (MBWMRgbaIcon **)&l->data); + p = icon_from_net_wm_icon (p, &l->data); if (list_end) { @@ -981,7 +973,7 @@ if (props_req & MBWM_WINDOW_PROP_NET_USER_TIME) { - unsigned long *user_time = NULL; + unsigned char *user_time = NULL; mb_wm_property_reply (wm, cookies[COOKIE_WIN_USER_TIME], @@ -989,7 +981,7 @@ &actual_format_return, &nitems_return, &bytes_after_return, - (unsigned char **)&user_time, + &user_time, &x_error_code); if (x_error_code @@ -1008,7 +1000,7 @@ } else { - win->user_time = *user_time; + win->user_time = (unsigned long)*user_time; MBWM_DBG("@@@ user time %d @@@", win->user_time); } @@ -1018,7 +1010,7 @@ if (props_req & MBWM_WINDOW_PROP_HILDON_STACKING) { - unsigned long *value = NULL; + unsigned char *value = NULL; mb_wm_property_reply (wm, cookies[COOKIE_WIN_HILDON_STACKING], @@ -1026,7 +1018,7 @@ &actual_format_return, &nitems_return, &bytes_after_return, - (unsigned char **)&value, + &value, &x_error_code); if (x_error_code Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-decor.c =================================================================== --- projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-decor.c 2009-04-03 11:16:40 UTC (rev 18004) +++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-decor.c 2009-04-03 12:30:26 UTC (rev 18005) @@ -1059,8 +1059,8 @@ mb_wm_theme_get_button_size (wm->theme, decor, type, - &button->geom.width, - &button->geom.height); + (int *)&button->geom.width, + (int *)&button->geom.height); button->press = press; button->release = release; Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-main-context.c =================================================================== --- projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-main-context.c 2009-04-03 11:16:40 UTC (rev 18004) +++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-main-context.c 2009-04-03 12:30:26 UTC (rev 18005) @@ -203,10 +203,10 @@ MBWMMainContext *ctx) { MBWindowManager *wm = ctx->wm; +#if (MBWM_WANT_DEBUG) MBWMList *iter; Window xwin = xev->xany.window; -#if (MBWM_WANT_DEBUG) if (mbwm_debug_flags & MBWM_DEBUG_EVENT) { MBWindowManagerClient *ev_client; Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-root-window.c =================================================================== --- projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-root-window.c 2009-04-03 11:16:40 UTC (rev 18004) +++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-root-window.c 2009-04-03 12:30:26 UTC (rev 18005) @@ -25,6 +25,7 @@ #include "../client-types/mb-wm-client-app.h" #include <X11/Xmd.h> +#include <unistd.h> static void mb_wm_root_window_class_init (MBWMObjectClass *klass) Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-types.h =================================================================== --- projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-types.h 2009-04-03 11:16:40 UTC (rev 18004) +++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-types.h 2009-04-03 12:30:26 UTC (rev 18005) @@ -48,7 +48,7 @@ typedef struct MBGeometry { int x,y; - int width,height; + unsigned int width, height; } MBGeometry; typedef struct MBWMList MBWMList; Modified: projects/haf/trunk/libmatchbox2/matchbox/core/xas.c =================================================================== --- projects/haf/trunk/libmatchbox2/matchbox/core/xas.c 2009-04-03 11:16:40 UTC (rev 18004) +++ projects/haf/trunk/libmatchbox2/matchbox/core/xas.c 2009-04-03 12:30:26 UTC (rev 18005) @@ -420,7 +420,7 @@ bytes_read, nbytes, netbytes); /* _XReadPad (dpy, (char *) task->data, netbytes); */ - _XGetAsyncData (dpy, task->data, buf, len, + _XGetAsyncData (dpy, (char *)task->data, buf, len, bytes_read, nbytes, netbytes); } @@ -437,7 +437,7 @@ __FUNCTION__, bytes_read, nbytes, netbytes); /* _XRead16Pad (dpy, (short *) task->data, netbytes); */ - _XGetAsyncData (dpy, task->data, buf, len, + _XGetAsyncData (dpy, (char*)task->data, buf, len, bytes_read, nbytes, netbytes); } break; @@ -464,7 +464,7 @@ /* Store the 32-bit values in the end of the array */ netdata = task->data + nbytes / 2; - _XGetAsyncData (dpy, netdata, buf, len, + _XGetAsyncData (dpy, (char*)netdata, buf, len, bytes_read, netbytes, netbytes); @@ -482,7 +482,7 @@ else { /* Here the wire format matches our actual format */ - _XGetAsyncData (dpy, task->data, buf, len, + _XGetAsyncData (dpy, (char*)task->data, buf, len, bytes_read, netbytes, netbytes); } Modified: projects/haf/trunk/libmatchbox2/matchbox/theme-engines/mb-wm-theme.c =================================================================== --- projects/haf/trunk/libmatchbox2/matchbox/theme-engines/mb-wm-theme.c 2009-04-03 11:16:40 UTC (rev 18004) +++ projects/haf/trunk/libmatchbox2/matchbox/theme-engines/mb-wm-theme.c 2009-04-03 12:30:26 UTC (rev 18005) @@ -1973,7 +1973,7 @@ XftTextExtentsUtf8 (xdpy, dd->font, - title, strlen(title), + (unsigned char*)title, strlen(title), &extents); centering_padding = (rec.width - extents.width) / 2; } @@ -1983,8 +1983,9 @@ XftDrawStringUtf8(dd->xftdraw, &dd->clr, dd->font, - left_padding + centering_padding + west_width + pack_start_x + (h / 5), y, - title, strlen (title)); + left_padding + centering_padding + west_width + + pack_start_x + (h / 5), y, + (unsigned char*)title, strlen (title)); } XFreeGC (xdpy, gc); @@ -2096,6 +2097,7 @@ XRenderColor rclr; XftColor clr; XRectangle rec; + const char *qmark = "?"; snprintf (desc, sizeof (desc), "%s-%i:bold", d && d->font_family ? d->font_family : "Sans", h*3/4); @@ -2122,7 +2124,7 @@ x + 4 + left_padding, y + (h - (font->ascent + font->descent))/2 + font->ascent, - "?", 1); + (unsigned char*)qmark, 1); XftFontClose (xdpy, font); }
- Previous message: [maemo-commits] r18004 - in projects/haf/trunk/libmatchbox2: . matchbox/core
- Next message: [maemo-commits] r18006 - projects/haf/trunk/libmatchbox2/matchbox/core
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]