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

Chris Wilson boxbackup-dev@fluffy.co.uk
Wed, 21 Dec 2005 01:25:49 +0000 (GMT)


Hi Martin,

> Author: martin
> Date: 2005-12-20 08:13:21 +0000 (Tue, 20 Dec 2005)
> New Revision: 248
>
> Modified:
>   box/trunk/lib/backupclient/BackupStoreFile.h
> Log:
> Fix CodingChunkAlloc/Free for use on 32 and 64 bit platforms

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?

Cheers, Chris.
-- 
_ ___ __     _
  / __/ / ,__(_)_  | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Perl/SQL/HTML Developer |
\ _/_/_/_//_/___/ | We are GNU-free your mind-and your software |