]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commitdiff
Enable C4305 'identifier' : truncation from 'type1' to 'type2'
authorDmitri Smirnov <dmitrism@microsoft.com>
Sat, 7 Nov 2015 00:44:39 +0000 (16:44 -0800)
committerDmitri Smirnov <dmitrism@microsoft.com>
Sat, 7 Nov 2015 00:44:39 +0000 (16:44 -0800)
CMakeLists.txt
memtable/hash_cuckoo_rep.cc

index 90394a33f49d53765c0877c445ac772ea40b8abb..9f625c4d1a07a82eb0c8db551f28cc5164335225 100644 (file)
@@ -58,7 +58,7 @@ add_custom_command(OUTPUT ${BUILD_VERSION_CC}
 add_custom_target(GenerateBuildVersion DEPENDS ${BUILD_VERSION_CC})
 
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zi /nologo  /EHsc /GS /Gd /GR /GF /fp:precise /Zc:wchar_t /Zc:forScope /errorReport:queue")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FC /d2Zi+ /W3 /WX /wd4127 /wd4244 /wd4267 /wd4305 /wd4800 /wd4804 /wd4996")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FC /d2Zi+ /W3 /WX /wd4127 /wd4244 /wd4267 /wd4800 /wd4804 /wd4996")
 
 # Used to run CI build and tests so we can run faster
 set(OPTIMIZE_DEBUG_DEFAULT 0)        # Debug build is unoptimized by default use -DOPTDBG=1 to optimize
index 447113ddff4c3e313e8775ca7ba210dd6134d7b2..fdf09c6f326928081775a6fab02cd53dd025da93 100644 (file)
@@ -318,7 +318,7 @@ void HashCuckooRep::Get(const LookupKey& key, void* callback_args,
 }
 
 void HashCuckooRep::Insert(KeyHandle handle) {
-  static const float kMaxFullness = 0.90;
+  static const float kMaxFullness = 0.90f;
 
   auto* key = static_cast<char*>(handle);
   int initial_hash_id = 0;
@@ -620,7 +620,7 @@ MemTableRep* HashCuckooRepFactory::CreateMemTableRep(
   // degrades as the fullness of the mem-table increases.  Setting kFullness
   // to a value around 0.7 can better avoid write performance degradation while
   // keeping efficient memory usage.
-  static const float kFullness = 0.7;
+  static const float kFullness = 0.7f;
   size_t pointer_size = sizeof(std::atomic<const char*>);
   assert(write_buffer_size_ >= (average_data_size_ + pointer_size));
   size_t bucket_count =