From: Karel Zak Date: Tue, 13 May 2014 07:58:58 +0000 (+0200) Subject: cfdisk: fix compiler warning [-Wsign-compare] X-Git-Tag: v2.25-rc1~176 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a08fa9ab575b3080b50aae904c7b8fc215ed2429;p=thirdparty%2Futil-linux.git cfdisk: fix compiler warning [-Wsign-compare] Signed-off-by: Karel Zak --- diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c index 9d198e25ec..f3d665afd0 100644 --- a/disk-utils/cfdisk.c +++ b/disk-utils/cfdisk.c @@ -1178,7 +1178,6 @@ static ssize_t ui_get_string(struct cfdisk *cf, const char *prompt, { size_t cells = 0; ssize_t i = 0, rc = -1; - wint_t c; int ln = MENU_START_LINE, cl = 1; assert(cf); @@ -1212,8 +1211,10 @@ static ssize_t ui_get_string(struct cfdisk *cf, const char *prompt, while (1) { #if !defined(HAVE_SLCURSES_H) && !defined(HAVE_SLANG_SLCURSES_H) && \ defined(HAVE_LIBNCURSESW) && defined(HAVE_WIDECHAR) + wint_t c; if (get_wch(&c) == ERR) { #else + int c; if ((c = getch()) == ERR) { #endif if (!isatty(STDIN_FILENO))