From 5bdd523b102f44471068e52db0e0462440a78fd1 Mon Sep 17 00:00:00 2001 From: Russell Steicke Date: Tue, 18 Mar 2008 17:47:43 +0900 Subject: [PATCH] Fix signed char comparison where char is unsigned by default tig uses a char as a flag, and expects that to have three values: TRUE, FALSE, and -1. When char is unsigned char (such as on PPC), this fails with the compiler warning "comparison is always false due to limited range of data type". So explicitly make the flag a signed char. Detecting the int8_t type with the autoconf macro AC_CREATE_STDINT_H would probably be a better fix. Signed-off-by: Russell Steicke Signed-off-by: Jonas Fonseca --- tig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tig.c b/tig.c index 71ddbb5..39e22e7 100644 --- a/tig.c +++ b/tig.c @@ -434,7 +434,7 @@ static iconv_t opt_iconv = ICONV_NONE; static char opt_search[SIZEOF_STR] = ""; static char opt_cdup[SIZEOF_STR] = ""; static char opt_git_dir[SIZEOF_STR] = ""; -static char opt_is_inside_work_tree = -1; /* set to TRUE or FALSE */ +static signed char opt_is_inside_work_tree = -1; /* set to TRUE or FALSE */ static char opt_editor[SIZEOF_STR] = ""; enum option_type { -- 2.30.2