From bb5f5d107e2feec31393e423698999d70d9a2285 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Tue, 13 Jan 2015 17:35:54 +0100 Subject: [PATCH] unix: fix -Wsign-compare warning in tty.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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é --- src/unix/tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unix/tty.c b/src/unix/tty.c index 191964da8ea..a1ea433f817 100644 --- a/src/unix/tty.c +++ b/src/unix/tty.c @@ -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);