diff --git a/db/db.vcproj b/db/db.vcproj index 9675a9a3d6f..f413bfd6dec 100644 --- a/db/db.vcproj +++ b/db/db.vcproj @@ -2,7 +2,7 @@ - - - - - @@ -381,6 +369,18 @@ /> + + + + + diff --git a/scripting/engine.cpp b/scripting/engine.cpp index b355e65954a..33c0f400470 100644 --- a/scripting/engine.cpp +++ b/scripting/engine.cpp @@ -37,10 +37,11 @@ namespace mongo { File f; f.open( filename.c_str() ); - char * data = (char*)malloc( f.len() + 1 ); - data[f.len()] = 0; - - f.read( 0 , data , f.len() ); + fileofs L = f.len(); + assert( L <= 0x7ffffffe ); + char * data = (char*)malloc( (size_t) L+1 ); + data[L] = 0; + f.read( 0 , data , (size_t) L ); return exec( data , filename , printResult , reportError , assertOnError, timeoutMs ); } diff --git a/util/mmap.cpp b/util/mmap.cpp index 6b2ee813c33..feedd9645db 100644 --- a/util/mmap.cpp +++ b/util/mmap.cpp @@ -58,7 +58,7 @@ namespace mongo { void* MemoryMappedFile::map(const char *filename) { boost::uintmax_t l = boost::filesystem::file_size( filename ); assert( l <= 0x7fffffff ); - int i = l; + int i = (int) l; return map( filename , i ); }