diff options
Diffstat (limited to 'meta-oe/recipes-dbs/rocksdb/files/0001-utilities-Fix-build-failure-with-Werror-maybe-uninit.patch')
-rw-r--r-- | meta-oe/recipes-dbs/rocksdb/files/0001-utilities-Fix-build-failure-with-Werror-maybe-uninit.patch | 35 |
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 0000000000..ef0429a3c8 --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/0001-utilities-Fix-build-failure-with-Werror-maybe-uninit.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 8996f075e64da0e6ffeda57632ef31f8710defcc Mon Sep 17 00:00:00 2001 | ||
2 | From: He Zhe <zhe.he@windriver.com> | ||
3 | Date: Fri, 15 Mar 2019 16:47:03 +0800 | ||
4 | Subject: [PATCH] utilities: Fix build failure with -Werror=maybe-uninitialized | ||
5 | |||
6 | Summary: | ||
7 | Initialize magic_number to zero to avoid such failure. | ||
8 | utilities/blob_db/blob_log_format.cc:91:3: error: 'magic_number' may be used | ||
9 | uninitialized in this function [-Werror=maybe-uninitialized] | ||
10 | if (magic_number != kMagicNumber) { | ||
11 | ^~ | ||
12 | |||
13 | Upstream-Status: Accepted [expected version 5.19] | ||
14 | |||
15 | Signed-off-by: He Zhe <zhe.he@windriver.com> | ||
16 | --- | ||
17 | utilities/blob_db/blob_log_format.cc | 2 +- | ||
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/utilities/blob_db/blob_log_format.cc b/utilities/blob_db/blob_log_format.cc | ||
21 | index 2bf7028..8726cb8 100644 | ||
22 | --- a/utilities/blob_db/blob_log_format.cc | ||
23 | +++ b/utilities/blob_db/blob_log_format.cc | ||
24 | @@ -82,7 +82,7 @@ Status BlobLogFooter::DecodeFrom(Slice src) { | ||
25 | uint32_t src_crc = 0; | ||
26 | src_crc = crc32c::Value(src.data(), BlobLogFooter::kSize - sizeof(uint32_t)); | ||
27 | src_crc = crc32c::Mask(src_crc); | ||
28 | - uint32_t magic_number; | ||
29 | + uint32_t magic_number = 0; | ||
30 | if (!GetFixed32(&src, &magic_number) || !GetFixed64(&src, &blob_count) || | ||
31 | !GetFixed64(&src, &expiration_range.first) || | ||
32 | !GetFixed64(&src, &expiration_range.second) || !GetFixed32(&src, &crc)) { | ||
33 | -- | ||
34 | 2.7.4 | ||
35 | |||