On 8/7/14 4:34 PM, Ben Reser wrote:
> I expected that change would just shift the warnings around but it removes the
> warnings entirely. I'm still not sure it's right. We're setting a ptrdiff_t
> with the value from an apr_size_t. Shouldn't that result in a possible loss of
> data since we're setting a signed value (that should be the same size) with an
> unsigned value? At least I was under the impression that ptrdiff_t and size_t
> were both 32-bits on 32-bit platforms and 64-bits on 64-bit platforms.
>
> The casts seem safer to me because I know that the cast is safe because the
> difference from the two pointers can never be bigger than an apr_size_t because
> our buffer size is provided via an apr_size_t.
Ignore the attachment to the previous mail. I was going to attach the patch
but decided to test the fix on Windows myself. The attached patch was missing
the stddef.h include.
Received on 2014-08-08 01:39:15 CEST