From: pancake@nopcode.org Date: Thu, 8 Jul 2010 15:34:02 +0000 (+0200) Subject: fix gcc warnings X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=9e8f5f1348e3a38d5c0d90bddcf40c9c03caa098;p=st.git fix gcc warnings --- diff --git a/st.c b/st.c index 6b525c3..c64c25e 100755 --- a/st.c +++ b/st.c @@ -1104,7 +1104,7 @@ xdraws(char *s, Glyph base, int x, int y, int len) { if(base.mode & ATTR_GFX) for(i = 0; i < len; i++) - s[i] = gfx[s[i]]; + s[i] = gfx[(int)s[i]]; XSetFont(xw.dis, dc.gc, base.mode & ATTR_BOLD ? dc.bfont->fid : dc.font->fid); XDrawImageString(xw.dis, xw.buf, dc.gc, winx, winy, s, len); @@ -1225,7 +1225,7 @@ kpress(XEvent *ev) { shift = e->state & ShiftMask; len = XLookupString(e, buf, sizeof(buf), &ksym, NULL); - if(customkey = kmap(ksym)) + if((customkey = kmap(ksym))) ttywrite(customkey, strlen(customkey)); else if(len > 0) { buf[sizeof(buf)-1] = '\0';