summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2010-06-05 16:32:23 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2010-06-05 16:32:23 +0000
commitbc721be983a60f78349d7d5e893ce65d8f9136f1 (patch)
tree49199badb2946c7087f93ef82ea7074358147918 /usr.bin
parent3f5d035defc4171101ff5ffa21eda66bd94eb844 (diff)
Shut up gcc4 warnings.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tmux/array.h4
-rw-r--r--usr.bin/tmux/tty.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/tmux/array.h b/usr.bin/tmux/array.h
index d400acc4145..3edc718b359 100644
--- a/usr.bin/tmux/array.h
+++ b/usr.bin/tmux/array.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: array.h,v 1.4 2010/02/06 23:22:27 nicm Exp $ */
+/* $OpenBSD: array.h,v 1.5 2010/06/05 16:32:22 nicm Exp $ */
/*
* Copyright (c) 2006 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -47,7 +47,7 @@
} \
} while (0)
-#define ARRAY_EMPTY(a) ((a) == NULL || (a)->num == 0)
+#define ARRAY_EMPTY(a) (((void *) (a)) == NULL || (a)->num == 0)
#define ARRAY_LENGTH(a) ((a)->num)
#define ARRAY_DATA(a) ((a)->list)
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c
index f972cfa41fb..ae950f6a3a8 100644
--- a/usr.bin/tmux/tty.c
+++ b/usr.bin/tmux/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.86 2010/05/31 19:51:29 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.87 2010/06/05 16:32:22 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -1090,7 +1090,7 @@ tty_cursor(struct tty *tty, u_int cx, u_int cy)
* Use HPA if change is larger than absolute, otherwise move
* the cursor with CUB/CUF.
*/
- if (abs(change) > cx && tty_term_has(term, TTYC_HPA)) {
+ if ((u_int) abs(change) > cx && tty_term_has(term, TTYC_HPA)) {
tty_putcode1(tty, TTYC_HPA, cx);
goto out;
} else if (change > 0 && tty_term_has(term, TTYC_CUB)) {
@@ -1126,7 +1126,7 @@ tty_cursor(struct tty *tty, u_int cx, u_int cy)
* Try to use VPA if change is larger than absolute or if this
* change would cross the scroll region, otherwise use CUU/CUD.
*/
- if (abs(change) > cy ||
+ if ((u_int) abs(change) > cy ||
(change < 0 && cy - change > tty->rlower) ||
(change > 0 && cy - change < tty->rupper)) {
if (tty_term_has(term, TTYC_VPA)) {