aboutsummaryrefslogtreecommitdiff
path: root/dmenu.c
diff options
context:
space:
mode:
authorConnor Lane Smith <cls@lubutu.com>2011-05-16 12:59:31 +0100
committerConnor Lane Smith <cls@lubutu.com>2011-05-16 12:59:31 +0100
commitdd2f298252fc21ff7d3b14296068443cb39c38d9 (patch)
tree2848fc4ae187840e3aa71613f0bcc42e6f2eeb0f /dmenu.c
parent11ea52d1709423e0f4e6702aaee2dff2a3b0107e (diff)
downloaddmenu-dd2f298252fc21ff7d3b14296068443cb39c38d9.tar.gz
dmenu-dd2f298252fc21ff7d3b14296068443cb39c38d9.tar.bz2
dmenu-dd2f298252fc21ff7d3b14296068443cb39c38d9.zip
fixed extra warnings
Diffstat (limited to 'dmenu.c')
-rw-r--r--dmenu.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/dmenu.c b/dmenu.c
index cee73b2..a32131c 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -135,7 +135,7 @@ appenditem(Item *item, Item **list, Item **last) {
void
calcoffsets(void) {
- unsigned int i, n;
+ int i, n;
if(lines > 0)
n = lines * bh;
@@ -388,11 +388,11 @@ void
match(Bool sub) {
size_t len = strlen(text);
Item *lexact, *lprefix, *lsubstr, *exactend, *prefixend, *substrend;
- Item *item, *next;
+ Item *item, *lnext;
lexact = lprefix = lsubstr = exactend = prefixend = substrend = NULL;
- for(item = sub ? matches : items; item && item->text; item = next) {
- next = sub ? item->right : item + 1;
+ for(item = sub ? matches : items; item && item->text; item = lnext) {
+ lnext = sub ? item->right : item + 1;
if(!fstrncmp(text, item->text, len + 1))
appenditem(item, &lexact, &exactend);
else if(!fstrncmp(text, item->text, len))
@@ -429,7 +429,7 @@ size_t
nextrune(int incr) {
size_t n, len = strlen(text);
- for(n = cursor + incr; n >= 0 && n < len && (text[n] & 0xc0) == 0x80; n += incr);
+ for(n = cursor + incr; n < len && (text[n] & 0xc0) == 0x80; n += incr);
return n;
}
@@ -442,7 +442,7 @@ paste(void) {
XGetWindowProperty(dc->dpy, win, utf8, 0, (sizeof text / 4) + 1, False,
utf8, &da, &di, &dl, &dl, (unsigned char **)&p);
- insert(p, (q = strchr(p, '\n')) ? q-p : strlen(p));
+ insert(p, (q = strchr(p, '\n')) ? q-p : (ssize_t)strlen(p));
XFree(p);
drawmenu();
}