Skip to content

Commit

Permalink
GCC Action Flags (#1563)
Browse files Browse the repository at this point in the history
* Adding Wall Werror to GCC actions

* Update jmespath.cpp

* Fix missing break and fix GCC unused warning

* Attempt GCC warning fix

* GCC warning hidden?

* GCC fix?

* Wundefined-symbols

* Weverything

* Update to_tuple.hpp

* Fix GCC warning

* Won't use Werror on GCC12

* Update CMakeLists.txt
  • Loading branch information
stephenberry authored Jan 13, 2025
1 parent 5980f9a commit 70b4a10
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
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

0 comments on commit 70b4a10

Please sign in to comment.