mirror of
https://github.com/facebook/rocksdb.git
synced 2026-10-24 19:59:35 +03:00
Summary: TsanAnnotateMappedMemory() always builds a TsanMappedMemoryInfo payload for TEST_SYNC_POINT_CALLBACK(), but in builds where sync points compile to a no-op the local variable becomes unused and Clang fails with -Werror,-Wunused-variable. Move the explicit (void)info cast so it applies regardless of whether __SANITIZE_THREAD__ is enabled. This keeps the helper warning-free in: - non-TSAN builds - builds where TEST_SYNC_POINT_CALLBACK expands to nothing - TSAN builds that still want the SyncPoint payload for tests This was missed by CI because the warning only appears in the COMPILE_WITH_TSAN=1 + NDEBUG/release configuration. Our CI matrix covers release builds without TSAN and TSAN builds in debug mode, but not the TSAN+NDEBUG combination. No behavior change is intended. The helper still: - exposes the mapping metadata to SyncPoint-based tests - calls AnnotateNewMemory() in TSAN builds - remains a no-op with respect to runtime behavior in non-TSAN builds Pull Request resolved: https://github.com/facebook/rocksdb/pull/14597 Differential Revision: D100333855 Pulled By: xingbowang fbshipit-source-id: 3ff0b0c8a51b4959b7a36984e40ac31e49da82eb