diff --git a/CMakeLists.txt b/CMakeLists.txt index ff7a3984..ef27bc80 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -418,6 +418,12 @@ CHECK_CXX_COMPILER_FLAG("-Wunused-local-typedefs" CXX_UNUSED_LOCAL_TYPEDEFS) # gcc5 complains about this CHECK_CXX_COMPILER_FLAG("-Wunused-variable" CXX_WUNUSED_VARIABLE) +# gcc 10 complains about this +CHECK_C_COMPILER_FLAG("-Wstringop-overflow" CC_STRINGOP_OVERFLOW) +if(CC_STRINGOP_OVERFLOW) + set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Wno-stringop-overflow") +endif() + endif() include_directories(SYSTEM ${Boost_INCLUDE_DIRS}) diff --git a/unit/internal/graph_undirected.cpp b/unit/internal/graph_undirected.cpp index babc01a6..73d3e357 100644 --- a/unit/internal/graph_undirected.cpp +++ b/unit/internal/graph_undirected.cpp @@ -40,12 +40,12 @@ using namespace std; using namespace ue2; struct SimpleV { - size_t index; + size_t index = 0; string test_v = "SimpleV"; }; struct SimpleE { - size_t index; + size_t index = 0; string test_e = "SimpleE"; };