[Box Backup-commit] COMMIT r3486 - box/trunk/lib/backupstore

subversion at boxbackup.org subversion at boxbackup.org
Fri Dec 26 23:16:17 GMT 2014


Author: chris
Date: 2014-12-26 23:16:17 +0000 (Fri, 26 Dec 2014)
New Revision: 3486

Modified:
   box/trunk/lib/backupstore/BackupStoreFile.cpp
Log:
Fix MinGW64 compile error due to pointers being too large for uint32_t.

Modified: box/trunk/lib/backupstore/BackupStoreFile.cpp
===================================================================
--- box/trunk/lib/backupstore/BackupStoreFile.cpp	2014-12-26 23:16:13 UTC (rev 3485)
+++ box/trunk/lib/backupstore/BackupStoreFile.cpp	2014-12-26 23:16:17 UTC (rev 3486)
@@ -966,7 +966,7 @@
 	}
 	
 	// Check alignment of the block
-	ASSERT((((uint32_t)(long)rOutput.mpBuffer) % BACKUPSTOREFILE_CODING_BLOCKSIZE) == BACKUPSTOREFILE_CODING_OFFSET);
+	ASSERT((((uint64_t)rOutput.mpBuffer) % BACKUPSTOREFILE_CODING_BLOCKSIZE) == BACKUPSTOREFILE_CODING_OFFSET);
 
 	// Want to compress it?
 	bool compressChunk = (ChunkSize >= BACKUP_FILE_MIN_COMPRESSED_CHUNK_SIZE);
@@ -1054,7 +1054,7 @@
 int BackupStoreFile::DecodeChunk(const void *Encoded, int EncodedSize, void *Output, int OutputSize)
 {
 	// Check alignment of the encoded block
-	ASSERT((((uint32_t)(long)Encoded) % BACKUPSTOREFILE_CODING_BLOCKSIZE) == BACKUPSTOREFILE_CODING_OFFSET);
+	ASSERT((((uint64_t)Encoded) % BACKUPSTOREFILE_CODING_BLOCKSIZE) == BACKUPSTOREFILE_CODING_OFFSET);
 
 	// First check
 	if(EncodedSize < 1)




More information about the Boxbackup-commit mailing list