Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCC Action Flags #1563

Merged
merged 12 commits into from
Jan 13, 2025
2 changes: 1 addition & 1 deletion include/glaze/json/schema.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ struct glz::meta<glz::detail::schematic>
"ExtUnits", //
"ExtAdvanced"};

static constexpr glz::tuple value{&T::type, //
[[maybe_unused]] static constexpr glz::tuple value{&T::type, //
&T::properties, //
&T::items, //
&T::additionalProperties, //
Expand Down
1 change: 1 addition & 0 deletions include/glaze/json/skip.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ namespace glz::detail
skip_comment(ctx, it, end);
if (bool(ctx.error)) [[unlikely]]
return;
break;
}
case 'n': {
++it;
Expand Down
2 changes: 1 addition & 1 deletion include/glaze/json/write.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1580,7 +1580,7 @@ namespace glz
using V = std::decay_t<decltype(value.value)>;
static constexpr auto N = glz::tuple_size_v<V>;

static constexpr auto Opts = opening_and_closing_handled<Options>();
[[maybe_unused]] static constexpr auto Opts = opening_and_closing_handled<Options>();

// When merging it is possible that objects are completed empty
// and therefore behave like skipped members even when skip_null_members is off
Expand Down
8 changes: 7 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ target_compile_features(glz_test_common INTERFACE cxx_std_23)
target_link_libraries(glz_test_common INTERFACE ut::ut glaze::glaze)
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
target_compile_options(glz_test_common INTERFACE -fno-exceptions -fno-rtti)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13)
target_compile_options(glz_test_common INTERFACE -Wall -Wextra -pedantic)
else()
target_compile_options(glz_test_common INTERFACE -Wall -Wextra -pedantic $<$<CONFIG:Debug>:-Werror>)
endif()
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(glz_test_common INTERFACE -Wall -Wextra -pedantic $<$<CONFIG:Debug>:-Werror>)
else()
target_compile_options(glz_test_common INTERFACE -Wall -Wextra -pedantic)
Expand Down
5 changes: 0 additions & 5 deletions tests/jmespath/jmespath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,6 @@ struct gcc_maybe_uninitialized_t
int cqqq{};
};

struct test_wrapper_t
{
gcc_maybe_uninitialized_t test{};
};

suite gcc_maybe_uninitialized_tests = [] {
"gcc_maybe_uninitialized"_test = [] {
using namespace std::string_view_literals;
Expand Down