5384f0af6e
Summary: * added missing override specifiers for overriden methods this fixes compiler warnings emitted by g++ and clang++ when compile option `-Wsuggest-override` is turned on. * fix compile warning with -Wmaybe-uninitialized g++-11 warns about a _potentially_ uninitialized variable when using `-Wmaybe_uninitialized`: ``` env/env.cc: In member function ‘virtual rocksdb::Status rocksdb::Env::GetHostNameString(std::string*)’: env/env.cc:738:66: error: ‘hostname_buf’ may be used uninitialized [-Werror=maybe-uninitialized] 738 | Status s = GetHostName(hostname_buf.data(), hostname_buf.size()); | ^ In file included from /usr/include/c++/11/tuple:39, from /usr/include/c++/11/functional:54, from ./include/rocksdb/env.h:22, from env/env.cc:10: /usr/include/c++/11/array:176:7: note: by argument 1 of type ‘const std::array<char, 256>*’ to ‘constexpr std::array<_Tp, _Nm>::size_type std::array<_Tp, _Nm>::size() const [with _Tp = char; long unsigned int _Nm = 256]’ declared here 176 | size() const noexcept { return _Nm; } | ^~~~ env/env.cc:737:37: note: ‘hostname_buf’ declared here 737 | std::array<char, kMaxHostNameLen> hostname_buf; ``` Pull Request resolved: https://github.com/facebook/rocksdb/pull/9199 Reviewed By: jay-zhuang Differential Revision: D32630703 Pulled By: pdillinger fbshipit-source-id: 9ea3010b1105a582548e3c3c0db4475b201e4a10 |
||
---|---|---|
.. | ||
composite_env_wrapper.h | ||
composite_env.cc | ||
emulated_clock.h | ||
env_basic_test.cc | ||
env_chroot.cc | ||
env_chroot.h | ||
env_encryption_ctr.h | ||
env_encryption.cc | ||
env_hdfs.cc | ||
env_posix.cc | ||
env_test.cc | ||
env.cc | ||
file_system_tracer.cc | ||
file_system_tracer.h | ||
file_system.cc | ||
fs_posix.cc | ||
fs_readonly.h | ||
fs_remap.cc | ||
fs_remap.h | ||
io_posix_test.cc | ||
io_posix.cc | ||
io_posix.h | ||
mock_env_test.cc | ||
mock_env.cc | ||
mock_env.h | ||
unique_id_gen.cc | ||
unique_id_gen.h |