From b76ee39c67f83aae042ba2d16e05cb0c98e8185d Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Fri, 8 Jun 2018 01:09:56 +0200 Subject: [PATCH] Fix build warning when chars are unsigned Fix the following warning when chars are unsigned: viewer.c:988:25: warning: comparison of constant -1 with expression of type 'char' is always true [-Wtautological-constant-out-of-range-compare] while((c = getch()) != ERR) { --- src/viewer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/viewer.c b/src/viewer.c index 20d496d..f0a1d99 100644 --- a/src/viewer.c +++ b/src/viewer.c @@ -982,7 +982,7 @@ int int_length (int val) { int get_slide_number(char init) { int retval = init - '0'; - char c; + int c; // block for tenths of a second when using getch, ERR if no input halfdelay(GOTO_SLIDE_DELAY); while((c = getch()) != ERR) { -- 2.20.1