Skip to content

Commit

Permalink
Merge pull request #432 from furkanusta/fix416
Browse files Browse the repository at this point in the history
Fix for #416, Implicit falltrough warning on GCC7.1 (Re-sending)
  • Loading branch information
AzothAmmo authored Sep 7, 2017
2 parents 7292a60 + f7baa90 commit cb78660
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/cereal/archives/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ namespace cereal
#include <vector>
#include <string>

#if defined(__clang__) || (defined(__GNUC__) && __GNUC__ >= 7)
CEREAL_RAPIDJSON_DIAG_PUSH
CEREAL_RAPIDJSON_DIAG_OFF(implicit-fallthrough)
#endif

namespace cereal
{
// ######################################################################
Expand Down Expand Up @@ -1009,4 +1014,8 @@ CEREAL_REGISTER_ARCHIVE(cereal::JSONOutputArchive)
// tie input and output archives together
CEREAL_SETUP_ARCHIVE_TRAITS(cereal::JSONInputArchive, cereal::JSONOutputArchive)

#if defined(__clang__) || (defined(__GNUC__) && __GNUC__ >= 7)
CEREAL_RAPIDJSON_DIAG_POP
#endif

#endif // CEREAL_ARCHIVES_JSON_HPP_
7 changes: 7 additions & 0 deletions include/cereal/external/rapidjson/internal/regex.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ CEREAL_RAPIDJSON_DIAG_OFF(implicit-fallthrough)
#ifdef __GNUC__
CEREAL_RAPIDJSON_DIAG_PUSH
CEREAL_RAPIDJSON_DIAG_OFF(effc++)
#if __GNUC__ >= 7
CEREAL_RAPIDJSON_DIAG_OFF(implicit-fallthrough)
#endif
#endif

#ifdef _MSC_VER
Expand Down Expand Up @@ -694,6 +697,10 @@ CEREAL_RAPIDJSON_NAMESPACE_END
CEREAL_RAPIDJSON_DIAG_POP
#endif

#ifdef __GNUC__
CEREAL_RAPIDJSON_DIAG_POP
#endif

#ifdef _MSC_VER
CEREAL_RAPIDJSON_DIAG_POP
#endif
Expand Down

0 comments on commit cb78660

Please sign in to comment.