]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
cfdisk: fix compiler warning [-Wsign-compare]
authorKarel Zak <kzak@redhat.com>
Tue, 13 May 2014 07:58:58 +0000 (09:58 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 13 May 2014 07:58:58 +0000 (09:58 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
disk-utils/cfdisk.c

index 9d198e25ec14d870c5b6ac0b2253d7db1cff5da7..f3d665afd0749c71c5ed384e8a2806d2a923d4d0 100644 (file)
@@ -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))