From 433604843d58a1a088ddd70b8641157c5961f69d Mon Sep 17 00:00:00 2001 From: Pierre Hallot Date: Thu, 19 Aug 2021 17:04:34 +0200 Subject: [PATCH] Fix extra ";" clang warnings --- include/nlohmann/detail/conversions/to_json.hpp | 2 +- include/nlohmann/detail/output/binary_writer.hpp | 2 +- single_include/nlohmann/json.hpp | 4 ++-- test/thirdparty/Fuzzer/FuzzerDriver.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/nlohmann/detail/conversions/to_json.hpp b/include/nlohmann/detail/conversions/to_json.hpp index 08462a4bb..06323a272 100644 --- a/include/nlohmann/detail/conversions/to_json.hpp +++ b/include/nlohmann/detail/conversions/to_json.hpp @@ -94,7 +94,7 @@ struct external_constructor { j.m_value.destroy(j.m_type); j.m_type = value_t::binary; - j.m_value = typename BasicJsonType::binary_t(std::move(b));; + j.m_value = typename BasicJsonType::binary_t(std::move(b)); j.assert_invariant(); } }; diff --git a/include/nlohmann/detail/output/binary_writer.hpp b/include/nlohmann/detail/output/binary_writer.hpp index 1fa0cd2f7..42fd50e32 100644 --- a/include/nlohmann/detail/output/binary_writer.hpp +++ b/include/nlohmann/detail/output/binary_writer.hpp @@ -67,7 +67,7 @@ class binary_writer case value_t::discarded: default: { - JSON_THROW(type_error::create(317, "to serialize to BSON, top-level type must be object, but is " + std::string(j.type_name()), j));; + JSON_THROW(type_error::create(317, "to serialize to BSON, top-level type must be object, but is " + std::string(j.type_name()), j)); } } } diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 9858388b5..077338cb2 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -4602,7 +4602,7 @@ struct external_constructor { j.m_value.destroy(j.m_type); j.m_type = value_t::binary; - j.m_value = typename BasicJsonType::binary_t(std::move(b));; + j.m_value = typename BasicJsonType::binary_t(std::move(b)); j.assert_invariant(); } }; @@ -13617,7 +13617,7 @@ class binary_writer case value_t::discarded: default: { - JSON_THROW(type_error::create(317, "to serialize to BSON, top-level type must be object, but is " + std::string(j.type_name()), j));; + JSON_THROW(type_error::create(317, "to serialize to BSON, top-level type must be object, but is " + std::string(j.type_name()), j)); } } } diff --git a/test/thirdparty/Fuzzer/FuzzerDriver.cpp b/test/thirdparty/Fuzzer/FuzzerDriver.cpp index 95b0721c8..5ab6df2d5 100644 --- a/test/thirdparty/Fuzzer/FuzzerDriver.cpp +++ b/test/thirdparty/Fuzzer/FuzzerDriver.cpp @@ -148,7 +148,7 @@ static bool ParseOneFlag(const char *Param) { int Val = MyStol(Str); *FlagDescriptions[F].IntFlag = Val; if (Flags.verbosity >= 2) - Printf("Flag: %s %d\n", Name, Val);; + Printf("Flag: %s %d\n", Name, Val); return true; } else if (FlagDescriptions[F].UIntFlag) { unsigned int Val = std::stoul(Str);