[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1631598 - in /subversion/trunk/subversion: libsvn_fs_fs/verify.c tests/libsvn_fs_fs/fs-fs-fuzzy-test.c

From: Stefan Fuhrmann <stefan.fuhrmann_at_wandisco.com>
Date: Wed, 14 Jan 2015 01:47:53 +0100

On Tue, Jan 13, 2015 at 9:17 PM, Ben Reser <ben_at_reser.org> wrote:

> On 1/13/15 11:44 AM, Ben Reser wrote:
> > On 1/13/15 11:34 AM, Ben Reser wrote:
> >> On 1/13/15 11:13 AM, Branko ─îibej wrote:
> >>> Since it is a test, what's wrong with just casting the first vararg to
> >>> (apr_uint64_t) instead, since we "know" (i.e., hope) that off_t won't
> >>> overflow 64 bits ...
> >>
> >> If you cast it to apr_uint64_t it can read into memory it shouldn't be
> (i.e.
> >> the test may crash on platforms without 64-bit off_t). Maybe we don't
> care
> >> about those platforms, but I'm not aware of us requiring LFS/64-bit
> off_t.
> >
> > I should be clearer here. It can read into memory it shouldn't
> already. The
> > cast just makes the warning go away and hides the problem.
>
> Nevermind I was thinking in terms of passing pointers and this is passing
> by
> value not reference so Branko is right you can just cast the value.
> Committed
> in r1651469.
>
> Thanks for fixing this, Ben! Casting to uint64 is the right thing to do.

-- Stefan^2.
Received on 2015-01-14 01:50:35 CET

This is an archived mail posted to the Subversion Dev mailing list.