Disable -Werror=implicit-fallthrough on GCC7 and later. Taken from upstream: https://github.com/Tencent/rapidjson/commit/fe19b7b6016d446722621fb407738209d1a911e8 https://github.com/Tencent/rapidjson/commit/cba45fe9de6923b858edb0780e257b7257aa4f7b diff --git a/include/rapidjson/internal/regex.h b/include/rapidjson/internal/regex.h index 422a5240..d4039716 100644 --- a/include/rapidjson/internal/regex.h +++ b/include/rapidjson/internal/regex.h @@ -29,6 +29,9 @@ RAPIDJSON_DIAG_OFF(implicit-fallthrough) #ifdef __GNUC__ RAPIDJSON_DIAG_PUSH RAPIDJSON_DIAG_OFF(effc++) +#if __GNUC__ >= 7 +RAPIDJSON_DIAG_OFF(implicit-fallthrough) +#endif #endif #ifdef _MSC_VER Cast destination pointers to avoid a GCC error about memmove writing to a different type. Adapted from this upstream commit: https://github.com/Tencent/rapidjson/commit/fa5963a2f5b231ee2babff771f169ccca22870ed diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h --- a/include/rapidjson/document.h +++ b/include/rapidjson/document.h @@ -1425,7 +1425,7 @@ public: MemberIterator pos = MemberBegin() + (first - MemberBegin()); for (MemberIterator itr = pos; itr != last; ++itr) itr->~Member(); - std::memmove(&*pos, &*last, static_cast(MemberEnd() - last) * sizeof(Member)); + std::memmove(static_cast(&*pos), &*last, static_cast(MemberEnd() - last) * sizeof(Member)); data_.o.size -= static_cast(last - first); return pos; } @@ -1628,8 +1628,8 @@ public: RAPIDJSON_ASSERT(last <= End()); ValueIterator pos = Begin() + (first - Begin()); for (ValueIterator itr = pos; itr != last; ++itr) - itr->~GenericValue(); - std::memmove(pos, last, static_cast(End() - last) * sizeof(GenericValue)); + itr->~GenericValue(); + std::memmove(static_cast(pos), last, static_cast(End() - last) * sizeof(GenericValue)); data_.a.size -= static_cast(last - first); return pos; } @@ -1936,7 +1936,7 @@ private: if (count) { GenericValue* e = static_cast(allocator.Malloc(count * sizeof(GenericValue))); SetElementsPointer(e); - std::memcpy(e, values, count * sizeof(GenericValue)); + std::memcpy(static_cast(e), values, count * sizeof(GenericValue)); } else SetElementsPointer(0); @@ -1949,7 +1949,7 @@ private: if (count) { Member* m = static_cast(allocator.Malloc(count * sizeof(Member))); SetMembersPointer(m); - std::memcpy(m, members, count * sizeof(Member)); + std::memcpy(static_cast(m), members, count * sizeof(Member)); } else SetMembersPointer(0); s='msg-avail'>...Marius Bakke 2022-06-26gnu: ninja: Remove input label....Marius Bakke 2022-06-26gnu: ninja: Update to 1.11.0....Marius Bakke 2021-05-22gnu: ninja: Update to 1.10.2....Marius Bakke 2020-02-03gnu: ninja: Update to 1.10.0....Marius Bakke 2020-02-03gnu: ninja: Do not use unstable tarball....Marius Bakke 2019-07-07gnu: ninja: Python is a regular input....Marius Bakke 2019-07-07gnu: ninja: Build against Python 3....Marius Bakke