rocksdb/utilities/persistent_cache
Richard Barnes 51feb25567 Fix string-conversion issue in internal_repo_rocksdb/repo/utilities/persistent_cache/block_cache_tier_file.cc +2 (#14312)
Summary:
Pull Request resolved: https://github.com/facebook/rocksdb/pull/14312

This could is triggering `-Wstring-conversion`, which presents as:
```
warning: implicit conversion turns string literal into bool: A to B
```
This is often a bug and what was intended. The most frequent cause is the code was:
```
void foo(bool) { ... }
void foo(std::string) { ... }
foo("this gets interpreted as a bool");
```

It is also possible the issue is innocuous as part of an assert:
```
assert(!"this string is true, so the assertion is false");
EXPECT_FALSE("this string is true, so the expect fails");
```
in these cases the use is to "cute", so we modify the code to make it more obvious.
```
assert(false && "the compiler recognizes and doesn't complain about this pattern");
FAIL() << "much more obvious";
```

Reviewed By: dmm-fb

Differential Revision: D92528316

fbshipit-source-id: 93fbb624e8731c4cdb559746b44c1aa71d786304
2026-02-09 09:21:12 -08:00
..
block_cache_tier.cc Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
block_cache_tier.h Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
block_cache_tier_file.cc Fix string-conversion issue in internal_repo_rocksdb/repo/utilities/persistent_cache/block_cache_tier_file.cc +2 (#14312) 2026-02-09 09:21:12 -08:00
block_cache_tier_file.h Fix string-conversion issue in internal_repo_rocksdb/repo/utilities/persistent_cache/block_cache_tier_file.cc +2 (#14312) 2026-02-09 09:21:12 -08:00
block_cache_tier_file_buffer.h Run clang-format on utilities/ (except utilities/transactions/) (#10853) 2022-10-24 16:38:09 -07:00
block_cache_tier_metadata.cc Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
block_cache_tier_metadata.h Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
hash_table.h Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
hash_table_bench.cc Prefer static_cast in place of most reinterpret_cast (#12308) 2024-02-07 10:44:11 -08:00
hash_table_evictable.h Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
hash_table_test.cc Use C++20 in public API, fix CI (#13915) 2025-09-08 13:11:28 -07:00
lrulist.h Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
persistent_cache_bench.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
persistent_cache_test.cc Prefer static_cast in place of most reinterpret_cast (#12308) 2024-02-07 10:44:11 -08:00
persistent_cache_test.h Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
persistent_cache_tier.cc Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
persistent_cache_tier.h Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
persistent_cache_util.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
volatile_tier_impl.cc Fix string-conversion issue in internal_repo_rocksdb/repo/utilities/persistent_cache/volatile_tier_impl.cc +5 (#14296) 2026-02-05 11:22:28 -08:00
volatile_tier_impl.h Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00