Broken build on 32 bit: Fix -Wtautological-constant-out-of-range-compare.

Problem:

[ 51%] Building C object src/CMakeFiles/nvim.dir/os/rstream.c.o
/Users/eliseo/projects/os/neovim/src/os/rstream.c:237:24: error: comparison of constant
      9223372036854775807 with expression of type 'size_t' (aka 'unsigned long') is always true
      [-Werror,-Wtautological-constant-out-of-range-compare]
  assert(rstream->fpos <= INT64_MAX);
         ~~~~~~~~~~~~~ ^  ~~~~~~~~~
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^

Solution:

Assertion temporarily disabled.
TODO: Review types so that assertion can be used.
This commit is contained in:
Eliseo Martínez 2014-04-22 11:21:23 +02:00 committed by Thiago de Arruda
parent 5f60bf4eb2
commit a1a0c00589

View File

@ -234,7 +234,9 @@ static void fread_idle_cb(uv_idle_t *handle)
// the offset argument to uv_fs_read is int64_t, could someone really try // the offset argument to uv_fs_read is int64_t, could someone really try
// to read more than 9 quintillion (9e18) bytes? // to read more than 9 quintillion (9e18) bytes?
assert(rstream->fpos <= INT64_MAX); // DISABLED TO FIX BROKEN BUILD ON 32bit
// TODO Review types to allow assertion
// assert(rstream->fpos <= INT64_MAX);
// Synchronous read // Synchronous read
uv_fs_read( uv_fs_read(