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:
parent
55ea37125e
commit
bb5f5d107e
@ -108,7 +108,7 @@ int uv_tty_set_mode(uv_tty_t* tty, uv_tty_mode_t mode) {
|
|||||||
struct termios tmp;
|
struct termios tmp;
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
if (tty->mode == mode)
|
if (tty->mode == (int) mode)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
fd = uv__stream_fd(tty);
|
fd = uv__stream_fd(tty);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user