summaryrefslogtreecommitdiff
path: root/lib/backupclient/BackupStoreFile.h
diff options
context:
space:
mode:
authorMartin Ebourne <martin@ebourne.me.uk>2005-11-30 23:16:15 +0000
committerMartin Ebourne <martin@ebourne.me.uk>2005-11-30 23:16:15 +0000
commita1fc249484f3c88630901828918c72897dd2c18d (patch)
treebf633f6cb4064044a9f15a72554873b1ca1aba62 /lib/backupclient/BackupStoreFile.h
parent01ca97865fa9d6ed1a967e970927265f1c348289 (diff)
Merged martin/ppcfixes at r3 to trunk
Diffstat (limited to 'lib/backupclient/BackupStoreFile.h')
-rwxr-xr-xlib/backupclient/BackupStoreFile.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/backupclient/BackupStoreFile.h b/lib/backupclient/BackupStoreFile.h
index 0274107b..de37e8c8 100755
--- a/lib/backupclient/BackupStoreFile.h
+++ b/lib/backupclient/BackupStoreFile.h
@@ -124,7 +124,7 @@ public:
if(a == 0) return 0;
// Align to main block size
ASSERT(sizeof(uint32_t) == sizeof(void*)); // make sure casting the right pointer size, will need to fix on platforms with 64 bit pointers
- uint32_t adjustment = BACKUPSTOREFILE_CODING_BLOCKSIZE - (((uint32_t)a) % BACKUPSTOREFILE_CODING_BLOCKSIZE);
+ uint32_t adjustment = BACKUPSTOREFILE_CODING_BLOCKSIZE - (((uint32_t)(long)a) % BACKUPSTOREFILE_CODING_BLOCKSIZE);
uint8_t *b = (a + adjustment);
// Store adjustment
*b = (uint8_t)adjustment;
@@ -135,7 +135,7 @@ public:
{
// Check alignment is as expected
ASSERT(sizeof(uint32_t) == sizeof(void*)); // make sure casting the right pointer size, will need to fix on platforms with 64 bit pointers
- ASSERT((((uint32_t)Block) % BACKUPSTOREFILE_CODING_BLOCKSIZE) == BACKUPSTOREFILE_CODING_OFFSET);
+ ASSERT((((uint32_t)(long)Block) % BACKUPSTOREFILE_CODING_BLOCKSIZE) == BACKUPSTOREFILE_CODING_OFFSET);
uint8_t *a = (uint8_t*)Block;
a -= BACKUPSTOREFILE_CODING_OFFSET;
// Adjust downwards...