summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bfb1ff9)
raw | patch | inline | side by side (parent: bfb1ff9)
author | Russell Steicke <russellsteicke@gmail.com> | |
Tue, 18 Mar 2008 08:47:43 +0000 (17:47 +0900) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Wed, 19 Mar 2008 20:47:39 +0000 (21:47 +0100) |
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 <russellsteicke@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
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 <russellsteicke@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
tig.c | patch | blob | history |
index 71ddbb5ae41775c84ac9abaa2c59db5884504208..39e22e78c4839c9eece0ab04d1565302cb0dd7c7 100644 (file)
--- a/tig.c
+++ b/tig.c
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 {