mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-04 14:39:54 +00:00
rocksdb: Fix compile error for DEBUG_BUILD
Fixed do_compile error when DEBUG_BUILD = "1": 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> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
From 49dcd22dcf1aae5995c42eac0fda68516fc1cd43 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Yang <liezhi.yang@windriver.com>
|
||||
Date: Wed, 19 Jun 2019 17:57:24 +0800
|
||||
Subject: [PATCH] db/write_thread.cc: Initialize state
|
||||
|
||||
Fixed an error when compiled without -O2:
|
||||
db/write_thread.cc:183:14: error: 'state' may be used uninitialized in this function [-Werror=maybe-uninitialized]
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
|
||||
---
|
||||
db/write_thread.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/db/write_thread.cc b/db/write_thread.cc
|
||||
index 835992c..6f99a11 100644
|
||||
--- a/db/write_thread.cc
|
||||
+++ b/db/write_thread.cc
|
||||
@@ -59,7 +59,7 @@ uint8_t WriteThread::BlockingAwaitState(Writer* w, uint8_t goal_mask) {
|
||||
|
||||
uint8_t WriteThread::AwaitState(Writer* w, uint8_t goal_mask,
|
||||
AdaptationContext* ctx) {
|
||||
- uint8_t state;
|
||||
+ uint8_t state = 0;
|
||||
|
||||
// 1. Busy loop using "pause" for 1 micro sec
|
||||
// 2. Else SOMETIMES busy loop using "yield" for 100 micro sec (default)
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -12,6 +12,7 @@ PV = "6.5.2"
|
||||
|
||||
SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH} \
|
||||
file://0001-Fix-build-breakage-from-lock_guard-error-6161.patch \
|
||||
file://0001-db-write_thread.cc-Initialize-state.patch \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
Reference in New Issue
Block a user