[Box Backup-dev] COMMIT r248 - box/trunk/lib/backupclient

Martin Ebourne boxbackup-dev@fluffy.co.uk
Wed, 21 Dec 2005 01:31:56 +0000


On Wed, 2005-12-21 at 01:25 +0000, Chris Wilson wrote:
> I'm getting some warnings from Visual Studio about pointer truncation in 
> this code. In BackupStoreFile.h lines 128 and 139, I get "pointer 
> truncation from '{uint8_t,void} *' to 'unsigned long'.
> 
> This code is really hairy and I'm not sure how to work around it. Is it 
> possible to do the calculation without casting pointers to longs? Does 
> that even work on 64-bit platforms?

It needs to become an integer to do the non-additive arithmetic. Curious
to know what size pointers are on this setup. Are they long long?
Previously the code was casting to int32_t so I doubt that would have
been any better.

Cheers,

Martin