We could wrap it up in a helper (`ASSERT_FILE_POS`) that takes what you've
done @aktau, but only have it do something useful when `NDEBUG` is not
defined.  That would help keep the clutter down.  The reason I didn't make
the `NDEBUG` suggestion this morning is because I wanted to see if it would
be useful elsewhere.  At the moment, I don't think so, but it might still
be nice to have.


On Sat, May 31, 2014 at 11:47 AM, Nicolas Hillegeer <
notifications@github.com> wrote:

> In src/os/rstream.c:
>
> > @@ -235,8 +235,7 @@ 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?
> >    // upcast is meant to avoid tautological condition warning on 32 bits
> > -  uintmax_t fpos_intmax = rstream->fpos;
> > -  assert(fpos_intmax <= INT64_MAX);
> > +  assert((uintmax_t)rstream->fpos <= INT64_MAX);
>
> The only reason not to use #ifdef's is because our stated goals are to
> turn this project into something beautiful and hackable. #ifdef soup is a
> bit of the opposite. Any reason why an if-statement wouldn't work?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/neovim/neovim/pull/714/files#r13261699>.
>