30 Aug
2007
30 Aug
'07
3:49 p.m.
For example in src/lib/file-cache.c:
if (cache->mmap_base == MAP_FAILED) {
Should be fixed, probably like this:
if ((int)cache->mmap_base == MAP_FAILED) {
There are a lot of occurences for these in the source. GCC only warns
because of this, but DEC C is known to consider this an error:
Error: file-cache.c, line 79: In this statement, "new_base" and
"(-1)" may not be compared for equality or inequality.
if (new_base == MAP_FAILED) {
And indeed, unsigned integers and -1 are rarely equal.
-- Gabucino