diff --git a/contrib/capnproto-cmake/CMakeLists.txt b/contrib/capnproto-cmake/CMakeLists.txt index b655ad3e5d9..949481e7ef5 100644 --- a/contrib/capnproto-cmake/CMakeLists.txt +++ b/contrib/capnproto-cmake/CMakeLists.txt @@ -74,10 +74,9 @@ target_link_libraries(capnpc PUBLIC capnp) # The library has substandard code if (COMPILER_GCC) - set (SUPPRESS_WARNINGS -Wno-non-virtual-dtor -Wno-sign-compare -Wno-strict-aliasing -Wno-maybe-uninitialized - -Wno-deprecated-declarations -Wno-class-memaccess) + set (SUPPRESS_WARNINGS -w) elseif (COMPILER_CLANG) - set (SUPPRESS_WARNINGS -Wno-non-virtual-dtor -Wno-sign-compare -Wno-strict-aliasing -Wno-deprecated-declarations) + set (SUPPRESS_WARNINGS -w) set (CAPNP_PRIVATE_CXX_FLAGS -fno-char8_t) endif () diff --git a/src/Common/ZooKeeper/ZooKeeperImpl.cpp b/src/Common/ZooKeeper/ZooKeeperImpl.cpp index a3e82612ac8..2ee0c5aba17 100644 --- a/src/Common/ZooKeeper/ZooKeeperImpl.cpp +++ b/src/Common/ZooKeeper/ZooKeeperImpl.cpp @@ -424,7 +424,7 @@ void ZooKeeperRequest::write(WriteBuffer & out) const struct ZooKeeperResponse : virtual Response { - virtual ~ZooKeeperResponse() = default; + virtual ~ZooKeeperResponse() override = default; virtual void readImpl(ReadBuffer &) = 0; }; diff --git a/src/Common/ZooKeeper/ZooKeeperImpl.h b/src/Common/ZooKeeper/ZooKeeperImpl.h index 840cbdbde3f..305ee46d58a 100644 --- a/src/Common/ZooKeeper/ZooKeeperImpl.h +++ b/src/Common/ZooKeeper/ZooKeeperImpl.h @@ -260,7 +260,7 @@ struct ZooKeeperRequest : virtual Request ZooKeeperRequest() = default; ZooKeeperRequest(const ZooKeeperRequest &) = default; - virtual ~ZooKeeperRequest() = default; + virtual ~ZooKeeperRequest() override = default; virtual ZooKeeper::OpNum getOpNum() const = 0; diff --git a/src/Core/MySQL/MySQLReplication.h b/src/Core/MySQL/MySQLReplication.h index 7834a1b355c..b63b103e87a 100644 --- a/src/Core/MySQL/MySQLReplication.h +++ b/src/Core/MySQL/MySQLReplication.h @@ -499,7 +499,7 @@ namespace MySQLReplication virtual BinlogEventPtr readOneEvent() = 0; virtual void setReplicateDatabase(String db) = 0; virtual void setGTIDSets(GTIDSets sets) = 0; - virtual ~IFlavor() = default; + virtual ~IFlavor() override = default; }; class MySQLFlavor : public IFlavor diff --git a/src/Functions/GatherUtils/Sources.h b/src/Functions/GatherUtils/Sources.h index cebc28a059f..c1258308740 100644 --- a/src/Functions/GatherUtils/Sources.h +++ b/src/Functions/GatherUtils/Sources.h @@ -128,6 +128,8 @@ struct NumericArraySource : public ArraySourceImpl> #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wsuggest-override" #elif __clang_major__ >= 11 + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wsuggest-override" #pragma GCC diagnostic ignored "-Wsuggest-destructor-override" #endif