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) | ||
commit | 5bdd523b102f44471068e52db0e0462440a78fd1 | |
tree | e28dc9ea1c815a2fc1920579779587415f189b72 | tree | snapshot |
parent | bfb1ff9519ef60d33d6befe6c24b77233b776a33 | commit | diff |
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 <russellsteicke@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
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>
tig.c | diff | blob | history |