1
0
mirror of https://github.com/tmate-io/tmate-ssh-server.git synced 2020-11-18 19:53:51 -08:00

Shut up gcc4 warnings.

This commit is contained in:
Nicholas Marriott 2010-06-05 16:32:22 +00:00
parent 36c0871c23
commit 0440d325d9
2 changed files with 3 additions and 3 deletions

View File

@ -47,7 +47,7 @@
} \ } \
} while (0) } 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_LENGTH(a) ((a)->num)
#define ARRAY_DATA(a) ((a)->list) #define ARRAY_DATA(a) ((a)->list)

4
tty.c
View File

@ -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 * Use HPA if change is larger than absolute, otherwise move
* the cursor with CUB/CUF. * 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); tty_putcode1(tty, TTYC_HPA, cx);
goto out; goto out;
} else if (change > 0 && tty_term_has(term, TTYC_CUB)) { } 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 * Try to use VPA if change is larger than absolute or if this
* change would cross the scroll region, otherwise use CUU/CUD. * 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->rlower) ||
(change > 0 && cy - change < tty->rupper)) { (change > 0 && cy - change < tty->rupper)) {
if (tty_term_has(term, TTYC_VPA)) { if (tty_term_has(term, TTYC_VPA)) {