diff --git a/array.h b/array.h index eb829f5f..3cdf7195 100644 --- a/array.h +++ b/array.h @@ -1,4 +1,4 @@ -/* $Id: array.h,v 1.10 2010-02-08 18:29:32 tcunha Exp $ */ +/* $Id: array.h,v 1.11 2010-06-06 00:27:08 tcunha Exp $ */ /* * Copyright (c) 2006 Nicholas Marriott @@ -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/tty.c b/tty.c index 4ec22383..6c055d15 100644 --- a/tty.c +++ b/tty.c @@ -1,4 +1,4 @@ -/* $Id: tty.c,v 1.190 2010-06-06 00:23:44 tcunha Exp $ */ +/* $Id: tty.c,v 1.191 2010-06-06 00:27:08 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -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)) {