fix some warnings; inspired by a diff from Thordur Bjornsson.

This commit is contained in:
okan
2012-11-08 20:18:19 +00:00
parent c9c0a5fdbb
commit 04d4ed7b7e
3 changed files with 8 additions and 7 deletions

View File

@@ -481,7 +481,7 @@ void xu_ewmh_net_wm_number_of_desktops(struct screen_ctx *);
void xu_ewmh_net_showing_desktop(struct screen_ctx *); void xu_ewmh_net_showing_desktop(struct screen_ctx *);
void xu_ewmh_net_virtual_roots(struct screen_ctx *); void xu_ewmh_net_virtual_roots(struct screen_ctx *);
void xu_ewmh_net_current_desktop(struct screen_ctx *, long); void xu_ewmh_net_current_desktop(struct screen_ctx *, long);
void xu_ewmh_net_desktop_names(struct screen_ctx *, unsigned char *, int); void xu_ewmh_net_desktop_names(struct screen_ctx *, char *, int);
void xu_ewmh_net_wm_desktop(struct client_ctx *); void xu_ewmh_net_wm_desktop(struct client_ctx *);

View File

@@ -472,7 +472,7 @@ group_update_names(struct screen_ctx *sc)
strings = xmalloc((nstrings < CALMWM_NGROUPS ? CALMWM_NGROUPS : strings = xmalloc((nstrings < CALMWM_NGROUPS ? CALMWM_NGROUPS :
nstrings) * sizeof(*strings)); nstrings) * sizeof(*strings));
p = prop_ret; p = (char *)prop_ret;
while (n < nstrings) { while (n < nstrings) {
strings[n++] = xstrdup(p); strings[n++] = xstrdup(p);
p += strlen(p) + 1; p += strlen(p) + 1;
@@ -502,7 +502,7 @@ group_update_names(struct screen_ctx *sc)
static void static void
group_set_names(struct screen_ctx *sc) group_set_names(struct screen_ctx *sc)
{ {
unsigned char *p, *q; char *p, *q;
size_t len = 0, tlen, slen; size_t len = 0, tlen, slen;
int i; int i;

View File

@@ -188,7 +188,7 @@ xu_getstrprop(Window win, Atom atm, char **text) {
XTextProperty prop2; XTextProperty prop2;
if (Xutf8TextListToTextProperty(X_Dpy, list, nitems, if (Xutf8TextListToTextProperty(X_Dpy, list, nitems,
XUTF8StringStyle, &prop2) == Success) { XUTF8StringStyle, &prop2) == Success) {
*text = xstrdup(prop2.value); *text = xstrdup((const char *)prop2.value);
XFree(prop2.value); XFree(prop2.value);
} }
} else { } else {
@@ -292,7 +292,8 @@ xu_ewmh_net_supported_wm_check(struct screen_ctx *sc)
XChangeProperty(X_Dpy, w, ewmh[_NET_SUPPORTING_WM_CHECK].atom, XChangeProperty(X_Dpy, w, ewmh[_NET_SUPPORTING_WM_CHECK].atom,
XA_WINDOW, 32, PropModeReplace, (unsigned char *)&w, 1); XA_WINDOW, 32, PropModeReplace, (unsigned char *)&w, 1);
XChangeProperty(X_Dpy, w, ewmh[_NET_WM_NAME].atom, XChangeProperty(X_Dpy, w, ewmh[_NET_WM_NAME].atom,
XA_WM_NAME, 8, PropModeReplace, WMNAME, strlen(WMNAME)); XA_WM_NAME, 8, PropModeReplace, (unsigned char *)WMNAME,
strlen(WMNAME));
} }
void void
@@ -396,10 +397,10 @@ xu_ewmh_net_current_desktop(struct screen_ctx *sc, long idx)
} }
void void
xu_ewmh_net_desktop_names(struct screen_ctx *sc, unsigned char *data, int n) xu_ewmh_net_desktop_names(struct screen_ctx *sc, char *data, int n)
{ {
XChangeProperty(X_Dpy, sc->rootwin, ewmh[_NET_DESKTOP_NAMES].atom, XChangeProperty(X_Dpy, sc->rootwin, ewmh[_NET_DESKTOP_NAMES].atom,
cwmh[UTF8_STRING].atom, 8, PropModeReplace, data, n); cwmh[UTF8_STRING].atom, 8, PropModeReplace, (unsigned char *)data, n);
} }
/* Application Window Properties */ /* Application Window Properties */