Resolve gcc8 warnings

This commit is contained in:
seelabs
2018-05-02 10:46:17 -04:00
committed by Nikolaos D. Bougalis
parent a442d3fdb3
commit 93780c25f7
2 changed files with 5 additions and 4 deletions

View File

@@ -420,9 +420,9 @@ add_with_props(rippled_src_all src/ripple/unity/ed25519_donna.c
-I"${CMAKE_SOURCE_DIR}/"src/ed25519-donna)
if (is_gcc)
set(no_init_w -Wno-maybe-uninitialized)
set(no_gcc_warnings -w)
else()
unset(no_init_w)
unset(no_gcc_warnings)
endif()
add_with_props(rippled_src_all src/ripple/unity/rocksdb.cpp
@@ -430,7 +430,7 @@ add_with_props(rippled_src_all src/ripple/unity/rocksdb.cpp
-I"${CMAKE_SOURCE_DIR}/"src/rocksdb2/include
-I"${CMAKE_SOURCE_DIR}/"src/snappy/snappy
-I"${CMAKE_SOURCE_DIR}/"src/snappy/config
${no_init_w} ${rocks_db_system_header})
${no_gcc_warnings} ${rocks_db_system_header})
if (NOT is_msvc)
set(no_unused_w -Wno-unused-function)

View File

@@ -365,7 +365,8 @@ Value::Value ( Value&& other ) noexcept
, type_ ( other.type_ )
, allocated_ ( other.allocated_ )
{
std::memset( &other, 0, sizeof(Value) );
other.type_ = nullValue;
other.allocated_ = 0;
}
Value&