aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliseo Martínez <eliseomarmol@gmail.com>2014-04-24 14:06:32 +0200
committerThiago de Arruda <tpadilha84@gmail.com>2014-04-24 10:59:44 -0300
commitae4090b2cee1f0434ddea41f601f88f2fe8413d0 (patch)
treea69a1306c0eb1dbd9b5f4051994e6bfce9115b8e
parentc3fb8240bc03a34382c1cbcde21445e874ce6baa (diff)
downloadrneovim-ae4090b2cee1f0434ddea41f601f88f2fe8413d0.tar.gz
rneovim-ae4090b2cee1f0434ddea41f601f88f2fe8413d0.tar.bz2
rneovim-ae4090b2cee1f0434ddea41f601f88f2fe8413d0.zip
Broken build on 32 bit: Pending TODO: Reenable assertion.
On a1a0c00589a8efc664db82be6743136bb462e08f, an assertion was disabled because of breaking 32bit build. This fixes that so that it now always works.
-rw-r--r--src/os/rstream.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/os/rstream.c b/src/os/rstream.c
index 59cab457fa..c15dda4eb2 100644
--- a/src/os/rstream.c
+++ b/src/os/rstream.c
@@ -234,9 +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
// to read more than 9 quintillion (9e18) bytes?
- // DISABLED TO FIX BROKEN BUILD ON 32bit
- // TODO(elmart): Review types to allow assertion
- // assert(rstream->fpos <= INT64_MAX);
+ // upcast is meant to avoid tautological condition warning on 32 bits
+ uintmax_t fpos_intmax = rstream->fpos;
+ assert(fpos_intmax <= INT64_MAX);
// Synchronous read
uv_fs_read(