fix some signedness warnings

This commit is contained in:
Michael Weber 2012-06-29 16:58:04 +02:00
parent 80e96d3ea9
commit 95484ae032
2 changed files with 4 additions and 4 deletions

View File

@ -551,7 +551,7 @@ group_update_names(struct screen_ctx *sc)
nstrings) * sizeof(*strings)); nstrings) * sizeof(*strings));
i = n = 0; i = n = 0;
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;
@ -592,7 +592,7 @@ group_set_names(struct screen_ctx *sc)
tlen = len; tlen = len;
for (i = 0; i < sc->group_nonames; i++) { for (i = 0; i < sc->group_nonames; i++) {
slen = strlen(sc->group_names[i]) + 1; slen = strlen(sc->group_names[i]) + 1;
(void)strlcpy(q, sc->group_names[i], tlen); (void)strlcpy((char *) q, sc->group_names[i], tlen);
tlen -= slen; tlen -= slen;
q += slen; q += slen;
} }

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((char *) prop2.value);
XFree(prop2.value); XFree(prop2.value);
} }
} else { } else {
@ -285,7 +285,7 @@ xu_ewmh_net_supported_wm_check(struct screen_ctx *sc)
XChangeProperty(X_Dpy, w, _NET_SUPPORTING_WM_CHECK, XChangeProperty(X_Dpy, w, _NET_SUPPORTING_WM_CHECK,
XA_WINDOW, 32, PropModeReplace, (unsigned char *)&w, 1); XA_WINDOW, 32, PropModeReplace, (unsigned char *)&w, 1);
XChangeProperty(X_Dpy, w, _NET_WM_NAME, UTF8_STRING, XChangeProperty(X_Dpy, w, _NET_WM_NAME, UTF8_STRING,
8, PropModeReplace, WMNAME, strlen(WMNAME)); 8, PropModeReplace, (unsigned char *) WMNAME, strlen(WMNAME));
} }
unsigned long unsigned long