unix: fix -Wsign-compare warning in tty.c

The mode argument is an enum now and the signedness of an enum is
implementation-defined when it doesn't have negative members.

Cast it to int in the comparison to tty->mode because the latter is
still an int.

PR: https://github.com/libuv/libuv/pull/134
Reviewed-by: Saúl Ibarra Corretgé <saghul@gmail.com>
This commit is contained in:
Ben Noordhuis 2015-01-13 17:35:54 +01:00 committed by Saúl Ibarra Corretgé
parent 55ea37125e
commit bb5f5d107e

View File

@ -108,7 +108,7 @@ int uv_tty_set_mode(uv_tty_t* tty, uv_tty_mode_t mode) {
struct termios tmp;
int fd;
if (tty->mode == mode)
if (tty->mode == (int) mode)
return 0;
fd = uv__stream_fd(tty);