Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #99: cmake: Silent
leveldb
-specific warnings
33dee19 fixup! cmake: Build `leveldb` static library (Hennadii Stepanov) Pull request description: This PR split from #84 It introduces a new `warn_leveldb_interface`, which overrides `-Wconditional-uninitialized` and `-Wsuggest-override` if any. For MSVC builds, dropped warning suppressions that are provided at the global level. For example, on the staging branch: ``` $ env CC=clang CXX=clang++ CXXFLAGS="-Wconditional-uninitialized -Wsuggest-override" cmake -B build $ cmake --build build --target leveldb > /dev/null /home/hebasto/git/bitcoin/src/leveldb/db/c.cc:474:17: warning: 'Name' overrides a member function but is not marked 'override' [-Wsuggest-override] const char* Name() const { return rep_->Name(); } ^ /home/hebasto/git/bitcoin/src/leveldb/db/c.cc:110:15: note: overridden virtual function is here const char* Name() const override { return (*name_)(state_); } ^ /home/hebasto/git/bitcoin/src/leveldb/db/c.cc:475:10: warning: 'CreateFilter' overrides a member function but is not marked 'override' [-Wsuggest-override] void CreateFilter(const Slice* keys, int n, std::string* dst) const { ^ /home/hebasto/git/bitcoin/src/leveldb/db/c.cc:112:8: note: overridden virtual function is here void CreateFilter(const Slice* keys, int n, std::string* dst) const override { ^ /home/hebasto/git/bitcoin/src/leveldb/db/c.cc:478:10: warning: 'KeyMayMatch' overrides a member function but is not marked 'override' [-Wsuggest-override] bool KeyMayMatch(const Slice& key, const Slice& filter) const { ^ /home/hebasto/git/bitcoin/src/leveldb/db/c.cc:125:8: note: overridden virtual function is here bool KeyMayMatch(const Slice& key, const Slice& filter) const override { ^ 3 warnings generated. /home/hebasto/git/bitcoin/src/leveldb/db/version_set.cc:1016:55: warning: variable 'manifest_size' may be uninitialized when used here [-Wconditional-uninitialized] descriptor_log_ = new log::Writer(descriptor_file_, manifest_size); ^~~~~~~~~~~~~ /home/hebasto/git/bitcoin/src/leveldb/db/version_set.cc:997:25: note: initialize the variable 'manifest_size' to silence this warning uint64_t manifest_size; ^ = 0 1 warning generated. ``` ACKs for top commit: vasild: ACK 33dee19 theuni: ACK 33dee19 Tree-SHA512: ffe9efc438bc808a42abaa42a45f7073c1e3cdd6404e9b8b811e94b304c2464f3df26c276d363c97a3941d50f0e6bcb3788f1d870dd23df86b0d9a33363b7e77
- Loading branch information