summaryrefslogtreecommitdiff
path: root/app/cwm
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2012-11-08 20:18:20 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2012-11-08 20:18:20 +0000
commit9c295445adf40554498c876a37cb753a9b842d9a (patch)
tree9f16dfe06f2fc9696d76741858664dda3ef58e32 /app/cwm
parent7e0a6f9a873a76462d0d28c8e853675fcbbc10e8 (diff)
fix some warnings; inspired by a diff from Thordur Bjornsson.
Diffstat (limited to 'app/cwm')
-rw-r--r--app/cwm/calmwm.h4
-rw-r--r--app/cwm/group.c6
-rw-r--r--app/cwm/xutil.c11
3 files changed, 11 insertions, 10 deletions
diff --git a/app/cwm/calmwm.h b/app/cwm/calmwm.h
index 9370f5799..64d816896 100644
--- a/app/cwm/calmwm.h
+++ b/app/cwm/calmwm.h
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: calmwm.h,v 1.158 2012/11/07 20:34:39 okan Exp $
+ * $OpenBSD: calmwm.h,v 1.159 2012/11/08 20:18:19 okan Exp $
*/
#ifndef _CALMWM_H_
@@ -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_virtual_roots(struct screen_ctx *);
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 *);
diff --git a/app/cwm/group.c b/app/cwm/group.c
index ac663f08b..2e55e69e5 100644
--- a/app/cwm/group.c
+++ b/app/cwm/group.c
@@ -16,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: group.c,v 1.61 2012/11/07 20:34:39 okan Exp $
+ * $OpenBSD: group.c,v 1.62 2012/11/08 20:18:19 okan Exp $
*/
#include <sys/param.h>
@@ -472,7 +472,7 @@ group_update_names(struct screen_ctx *sc)
strings = xmalloc((nstrings < CALMWM_NGROUPS ? CALMWM_NGROUPS :
nstrings) * sizeof(*strings));
- p = prop_ret;
+ p = (char *)prop_ret;
while (n < nstrings) {
strings[n++] = xstrdup(p);
p += strlen(p) + 1;
@@ -502,7 +502,7 @@ group_update_names(struct screen_ctx *sc)
static void
group_set_names(struct screen_ctx *sc)
{
- unsigned char *p, *q;
+ char *p, *q;
size_t len = 0, tlen, slen;
int i;
diff --git a/app/cwm/xutil.c b/app/cwm/xutil.c
index e43a30a13..c8eed2a7c 100644
--- a/app/cwm/xutil.c
+++ b/app/cwm/xutil.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: xutil.c,v 1.47 2012/11/07 20:34:39 okan Exp $
+ * $OpenBSD: xutil.c,v 1.48 2012/11/08 20:18:19 okan Exp $
*/
#include <sys/param.h>
@@ -188,7 +188,7 @@ xu_getstrprop(Window win, Atom atm, char **text) {
XTextProperty prop2;
if (Xutf8TextListToTextProperty(X_Dpy, list, nitems,
XUTF8StringStyle, &prop2) == Success) {
- *text = xstrdup(prop2.value);
+ *text = xstrdup((const char *)prop2.value);
XFree(prop2.value);
}
} 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,
XA_WINDOW, 32, PropModeReplace, (unsigned char *)&w, 1);
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
@@ -396,10 +397,10 @@ xu_ewmh_net_current_desktop(struct screen_ctx *sc, long idx)
}
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,
- cwmh[UTF8_STRING].atom, 8, PropModeReplace, data, n);
+ cwmh[UTF8_STRING].atom, 8, PropModeReplace, (unsigned char *)data, n);
}
/* Application Window Properties */