Skip to content

Commit

Permalink
small changes needed for gcc 7, 8 and 9
Browse files Browse the repository at this point in the history
  • Loading branch information
danpape committed Jan 17, 2020
1 parent 698cd6d commit 212befd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/cpp_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void badEncoding() {
std::string bstr = bech32::encode(hrp, data);
}
catch (std::exception &e) {
assert(strcmp(e.what(), "data value is out of range") == 0);
assert(std::string(e.what()) == "data value is out of range");
}
}

Expand Down
1 change: 1 addition & 0 deletions test/testbech32/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ add_executable(bech32_c_api_tests
)

target_compile_features(bech32_c_api_tests PRIVATE c_std_99)
target_compile_options(bech32_c_api_tests PRIVATE "-fPIC")
set_target_properties(bech32_c_api_tests PROPERTIES C_EXTENSIONS OFF)

target_link_libraries(bech32_c_api_tests PUBLIC bech32)
Expand Down

0 comments on commit 212befd

Please sign in to comment.