Fix -Werror=maybe-uninitialized in db_stress_tool (#9265)
Summary: Context/Summary: Uninitialized variable `SequenceNumber old_saved_seqno` causes asan related compilation error/warning below: ``` db_stress_tool/expected_state.cc:308:55: error: ‘old_saved_seqno’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 308 | if (s.ok() && old_saved_seqno != kMaxSequenceNumber && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ ``` Fix it by initializing to 0. Pull Request resolved: https://github.com/facebook/rocksdb/pull/9265 Test Plan: - make clean && COMPILE_WITH_ASAN=1 make -j48 db_stress_tool/expected_state.o - monitor if same error happens again after merging Reviewed By: ajkr Differential Revision: D32939630 Pulled By: hx235 fbshipit-source-id: 41697515fd11ada8427f606b5dceb4e58d12cb80main
parent
ce42ae6ffd
commit
66b31c5098
Loading…
Reference in new issue