db/write_thread.cc: Initialize state (#6275)
Summary: Fixed an error when compiled with -Og: db/write_thread.cc:183:14: error: 'state' may be used uninitialized in this function [-Werror=maybe-uninitialized] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Pull Request resolved: https://github.com/facebook/rocksdb/pull/6275 Differential Revision: D19381755 fbshipit-source-id: a90bf3cd4a7248d9d71219e918fc6253deb97e3c
This commit is contained in:
parent
876c2dbff4
commit
4e457278fa
@ -61,7 +61,7 @@ uint8_t WriteThread::BlockingAwaitState(Writer* w, uint8_t goal_mask) {
|
|||||||
|
|
||||||
uint8_t WriteThread::AwaitState(Writer* w, uint8_t goal_mask,
|
uint8_t WriteThread::AwaitState(Writer* w, uint8_t goal_mask,
|
||||||
AdaptationContext* ctx) {
|
AdaptationContext* ctx) {
|
||||||
uint8_t state;
|
uint8_t state = 0;
|
||||||
|
|
||||||
// 1. Busy loop using "pause" for 1 micro sec
|
// 1. Busy loop using "pause" for 1 micro sec
|
||||||
// 2. Else SOMETIMES busy loop using "yield" for 100 micro sec (default)
|
// 2. Else SOMETIMES busy loop using "yield" for 100 micro sec (default)
|
||||||
|
Loading…
Reference in New Issue
Block a user