aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-dbs/rocksdb/files
diff options
context:
space:
mode:
authorHe Zhe <zhe.he@windriver.com>2019-03-18 10:33:16 +0800
committerKhem Raj <raj.khem@gmail.com>2019-03-19 20:59:40 -0700
commit4ce1fb53568907701b0c9fa63ef96b863269c121 (patch)
tree964e6d728e24c91eef7b6cb821ff2a4ac8260070 /meta-oe/recipes-dbs/rocksdb/files
parent440edf54e5181667e68ca592ff8ab895e5458984 (diff)
downloadmeta-openembedded-4ce1fb53568907701b0c9fa63ef96b863269c121.tar.gz
utilities: Fix build failure with -Werror=maybe-uninitialized
Initialize magic_number to zero to avoid such failure. utilities/blob_db/blob_log_format.cc:91:3: error: 'magic_number' may be used uninitialized in this function [-Werror=maybe-uninitialized] if (magic_number != kMagicNumber) { ^~ Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-dbs/rocksdb/files')
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/0001-utilities-Fix-build-failure-with-Werror-maybe-uninit.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-utilities-Fix-build-failure-with-Werror-maybe-uninit.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-utilities-Fix-build-failure-with-Werror-maybe-uninit.patch
new file mode 100644
index 000000000..ef0429a3c
--- /dev/null
+++ b/meta-oe/recipes-dbs/rocksdb/files/0001-utilities-Fix-build-failure-with-Werror-maybe-uninit.patch
@@ -0,0 +1,35 @@
+From 8996f075e64da0e6ffeda57632ef31f8710defcc Mon Sep 17 00:00:00 2001
+From: He Zhe <zhe.he@windriver.com>
+Date: Fri, 15 Mar 2019 16:47:03 +0800
+Subject: [PATCH] utilities: Fix build failure with -Werror=maybe-uninitialized
+
+Summary:
+Initialize magic_number to zero to avoid such failure.
+utilities/blob_db/blob_log_format.cc:91:3: error: 'magic_number' may be used
+uninitialized in this function [-Werror=maybe-uninitialized]
+ if (magic_number != kMagicNumber) {
+ ^~
+
+Upstream-Status: Accepted [expected version 5.19]
+
+Signed-off-by: He Zhe <zhe.he@windriver.com>
+---
+ utilities/blob_db/blob_log_format.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/utilities/blob_db/blob_log_format.cc b/utilities/blob_db/blob_log_format.cc
+index 2bf7028..8726cb8 100644
+--- a/utilities/blob_db/blob_log_format.cc
++++ b/utilities/blob_db/blob_log_format.cc
+@@ -82,7 +82,7 @@ Status BlobLogFooter::DecodeFrom(Slice src) {
+ uint32_t src_crc = 0;
+ src_crc = crc32c::Value(src.data(), BlobLogFooter::kSize - sizeof(uint32_t));
+ src_crc = crc32c::Mask(src_crc);
+- uint32_t magic_number;
++ uint32_t magic_number = 0;
+ if (!GetFixed32(&src, &magic_number) || !GetFixed64(&src, &blob_count) ||
+ !GetFixed64(&src, &expiration_range.first) ||
+ !GetFixed64(&src, &expiration_range.second) || !GetFixed32(&src, &crc)) {
+--
+2.7.4
+