[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nano-devel] (un)signed char in files.c
From: |
Ken Tyler |
Subject: |
[Nano-devel] (un)signed char in files.c |
Date: |
Sun, 7 Apr 2002 12:40:33 +1000 |
Hello,
files.c: In function `read_file':
files.c:197: warning: comparison is always true due to limited range of data
type
197 if (!ISSET(NO_CONVERT) && input >= 0 && input <= 31
^^^^
because chars are unsigned on PowerPC (Don't ask, I have no idea).
What to do :
a) Make input a signed char
b) cast input for the one test
c) make the test a bit test for 7th bit
There was a similar problem years ago I seem to remenber when nano was
just starting out. I'll vote for c) for consistency (like what we did
then).
Ken.
- [Nano-devel] (un)signed char in files.c,
Ken Tyler <=