XTextWidth returns int and now in most places textnw is used as int
thus i propose
-uint textnw
+int textnw
(it adds 2 LOCs without much gain though..)
diff -r c4152a0199c8 dwm.c
--- a/dwm.c Fri Jun 06 11:49:31 2008 +0200
+++ b/dwm.c Sun Jun 08 09:28:25 2008 +0200
@@ -166,7 +166,7 @@
void setup(void);
void spawn(const void *arg);
void tag(const void *arg);
-uint textnw(const char *text, uint len);
+int textnw(const char *text, uint len);
void tile(void);
void togglebar(const void *arg);
void togglefloating(const void *arg);
@@ -296,7 +296,8 @@
void
buttonpress(XEvent *e) {
- uint i, x, mask;
+ uint i, mask;
+ int x;
Client *c;
XButtonPressedEvent *ev = &e->xbutton;
@@ -1308,7 +1309,8 @@
void
setup(void) {
- uint i, w;
+ uint i;
+ int w;
XSetWindowAttributes wa;
/* init screen */
@@ -1413,7 +1415,7 @@
}
}
-uint
+int
textnw(const char *text, uint len) {
XRectangle r;