summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2020-01-08 14:09:03 +0800
committerKhem Raj <raj.khem@gmail.com>2020-01-09 14:05:37 -0800
commitf88060d8a6fd25840369c3aaa34de63f9b737203 (patch)
tree4078ac33f274f1e274bd22d97d87e3c1ac382b70 /meta-oe
parentf9f868e3e3d023e80b20fd3c46884d72a503104a (diff)
downloadmeta-openembedded-f88060d8a6fd25840369c3aaa34de63f9b737203.tar.gz
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>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/0001-db-write_thread.cc-Initialize-state.patch31
-rw-r--r--meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb1
2 files changed, 32 insertions, 0 deletions
diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-db-write_thread.cc-Initialize-state.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-db-write_thread.cc-Initialize-state.patch
new file mode 100644
index 000000000..97ddbce59
--- /dev/null
+++ b/meta-oe/recipes-dbs/rocksdb/files/0001-db-write_thread.cc-Initialize-state.patch
@@ -0,0 +1,31 @@
1From 49dcd22dcf1aae5995c42eac0fda68516fc1cd43 Mon Sep 17 00:00:00 2001
2From: Robert Yang <liezhi.yang@windriver.com>
3Date: Wed, 19 Jun 2019 17:57:24 +0800
4Subject: [PATCH] db/write_thread.cc: Initialize state
5
6Fixed an error when compiled without -O2:
7db/write_thread.cc:183:14: error: 'state' may be used uninitialized in this function [-Werror=maybe-uninitialized]
8
9Upstream-Status: Pending
10
11Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
12---
13 db/write_thread.cc | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/db/write_thread.cc b/db/write_thread.cc
17index 835992c..6f99a11 100644
18--- a/db/write_thread.cc
19+++ b/db/write_thread.cc
20@@ -59,7 +59,7 @@ uint8_t WriteThread::BlockingAwaitState(Writer* w, uint8_t goal_mask) {
21
22 uint8_t WriteThread::AwaitState(Writer* w, uint8_t goal_mask,
23 AdaptationContext* ctx) {
24- uint8_t state;
25+ uint8_t state = 0;
26
27 // 1. Busy loop using "pause" for 1 micro sec
28 // 2. Else SOMETIMES busy loop using "yield" for 100 micro sec (default)
29--
302.7.4
31
diff --git a/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb b/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb
index 68c6bc2ff..44a451cd3 100644
--- a/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb
+++ b/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb
@@ -12,6 +12,7 @@ PV = "6.5.2"
12 12
13SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH} \ 13SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH} \
14 file://0001-Fix-build-breakage-from-lock_guard-error-6161.patch \ 14 file://0001-Fix-build-breakage-from-lock_guard-error-6161.patch \
15 file://0001-db-write_thread.cc-Initialize-state.patch \
15 " 16 "
16 17
17S = "${WORKDIR}/git" 18S = "${WORKDIR}/git"