aboutsummaryrefslogtreecommitdiff
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
parent11ea52d1709423e0f4e6702aaee2dff2a3b0107e (diff)
fixed extra warnings
-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) {
135 135
136void 136void
137calcoffsets(void) { 137calcoffsets(void) {
138 unsigned int i, n; 138 int i, n;
139 139
140 if(lines > 0) 140 if(lines > 0)
141 n = lines * bh; 141 n = lines * bh;
@@ -388,11 +388,11 @@ void
388match(Bool sub) { 388match(Bool sub) {
389 size_t len = strlen(text); 389 size_t len = strlen(text);
390 Item *lexact, *lprefix, *lsubstr, *exactend, *prefixend, *substrend; 390 Item *lexact, *lprefix, *lsubstr, *exactend, *prefixend, *substrend;
391 Item *item, *next; 391 Item *item, *lnext;
392 392
393 lexact = lprefix = lsubstr = exactend = prefixend = substrend = NULL; 393 lexact = lprefix = lsubstr = exactend = prefixend = substrend = NULL;
394 for(item = sub ? matches : items; item && item->text; item = next) { 394 for(item = sub ? matches : items; item && item->text; item = lnext) {
395 next = sub ? item->right : item + 1; 395 lnext = sub ? item->right : item + 1;
396 if(!fstrncmp(text, item->text, len + 1)) 396 if(!fstrncmp(text, item->text, len + 1))
397 appenditem(item, &lexact, &exactend); 397 appenditem(item, &lexact, &exactend);
398 else if(!fstrncmp(text, item->text, len)) 398 else if(!fstrncmp(text, item->text, len))
@@ -429,7 +429,7 @@ size_t
429nextrune(int incr) { 429nextrune(int incr) {
430 size_t n, len = strlen(text); 430 size_t n, len = strlen(text);
431 431
432 for(n = cursor + incr; n >= 0 && n < len && (text[n] & 0xc0) == 0x80; n += incr); 432 for(n = cursor + incr; n < len && (text[n] & 0xc0) == 0x80; n += incr);
433 return n; 433 return n;
434} 434}
435 435
@@ -442,7 +442,7 @@ paste(void) {
442 442
443 XGetWindowProperty(dc->dpy, win, utf8, 0, (sizeof text / 4) + 1, False, 443 XGetWindowProperty(dc->dpy, win, utf8, 0, (sizeof text / 4) + 1, False,
444 utf8, &da, &di, &dl, &dl, (unsigned char **)&p); 444 utf8, &da, &di, &dl, &dl, (unsigned char **)&p);
445 insert(p, (q = strchr(p, '\n')) ? q-p : strlen(p)); 445 insert(p, (q = strchr(p, '\n')) ? q-p : (ssize_t)strlen(p));
446 XFree(p); 446 XFree(p);
447 drawmenu(); 447 drawmenu();
448} 448}