Skip to content

Commit

Permalink
gcc-10: fix hyperscan compile issue
Browse files Browse the repository at this point in the history
Fixes github issue #239
  • Loading branch information
hongyang7 committed May 25, 2020
1 parent 765b8f9 commit 4d33736
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
4 changes: 2 additions & 2 deletions unit/internal/graph_undirected.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};

Expand Down

0 comments on commit 4d33736

Please sign in to comment.