Skip to content

Commit

Permalink
silence GCC false positives in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
grisumbras committed Sep 10, 2024
1 parent d71424c commit 9e6d3de
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/boost/json/detail/value_to.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,15 @@ try_make_tuple_like(
typename std::decay<tuple_element_t<Is, T>>::type >(
arr[Is], ctx, ec)
...);
#if defined(BOOST_GCC)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
if( ec.failed() )
return {boost::system::in_place_error, ec};
#if defined(BOOST_GCC)
# pragma GCC diagnostic pop
#endif

return {
boost::system::in_place_value, T(std::move(*std::get<Is>(items))...)};
Expand Down
1 change: 1 addition & 0 deletions test/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ project
<include>.
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
<toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS
<toolset>gcc:<cxxflags>-Wno-restrict # annoying false positives
;

for local f in $(SOURCES)
Expand Down

0 comments on commit 9e6d3de

Please sign in to comment.