changeset: 408:ea56fcb99615
tag: tip
user: Connor Lane Smith <cls_AT_lubutu.com>
date: Mon May 16 12:59:31 2011 +0100
files: dmenu.c
description:
fixed extra warnings
diff -r a740b7c3fe2f -r ea56fcb99615 dmenu.c
--- a/dmenu.c Sun May 15 21:54:26 2011 +0100
+++ b/dmenu.c Mon May 16 12:59:31 2011 +0100
@@ -135,7 +135,7 @@
void
calcoffsets(void) {
- unsigned int i, n;
+ int i, n;
if(lines > 0)
n = lines * bh;
@@ -388,11 +388,11 @@
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 @@
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 @@
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();
}
Received on Mon May 16 2011 - 14:00:07 CEST
This archive was generated by hypermail 2.2.0 : Mon May 16 2011 - 14:12:04 CEST