aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/lttng
diff options
context:
space:
mode:
authorMingli Yu <mingli.yu@windriver.com>2020-03-11 21:49:33 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-03-12 22:49:23 +0000
commit1b98db372a1fdaecf9bb897b0ee4b2e72af22f81 (patch)
tree3c6a50b21e97d760972be8a26495e8bfa85156d2 /meta/recipes-kernel/lttng
parent9d8edf33d1f5d89b310923b0aa3cc967317c7c49 (diff)
downloadopenembedded-core-1b98db372a1fdaecf9bb897b0ee4b2e72af22f81.tar.gz
openembedded-core-1b98db372a1fdaecf9bb897b0ee4b2e72af22f81.tar.bz2
openembedded-core-1b98db372a1fdaecf9bb897b0ee4b2e72af22f81.zip
babeltrace2: initialize the other_entry pointer
When add below line to local.conf to enable debug build: DEBUG_BUILD = "1" There comes below failure when run "bitbake babeltrace2" | ../../../../../git/src/plugins/ctf/fs-src/fs.c: In function 'ds_index_insert_ds_index_entry_sorted': | ../../../../../git/src/plugins/ctf/fs-src/fs.c:702:5: error: 'other_entry' may be used uninitialized in this function [-Werror=maybe-uninitialized] | 702 | !ds_index_entries_equal(entry, other_entry)) { So initialize the other_entry pointer to fix the above error. Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/lttng')
-rw-r--r--meta/recipes-kernel/lttng/babeltrace2/0001-fs.c-initialize-other_entry.patch33
-rw-r--r--meta/recipes-kernel/lttng/babeltrace2_2.0.1.bb1
2 files changed, 34 insertions, 0 deletions
diff --git a/meta/recipes-kernel/lttng/babeltrace2/0001-fs.c-initialize-other_entry.patch b/meta/recipes-kernel/lttng/babeltrace2/0001-fs.c-initialize-other_entry.patch
new file mode 100644
index 0000000000..b56b3bd6e0
--- /dev/null
+++ b/meta/recipes-kernel/lttng/babeltrace2/0001-fs.c-initialize-other_entry.patch
@@ -0,0 +1,33 @@
+From 42dae692b9057d03ce9a0651f061472e9dd90130 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <mingli.yu@windriver.com>
+Date: Wed, 11 Mar 2020 08:44:42 +0000
+Subject: [PATCH] fs.c: initialize the other_entry variable
+
+Initialize the pointer other_entry to fix the below error:
+| ../../../../../git/src/plugins/ctf/fs-src/fs.c: In function 'ds_index_insert_ds_index_entry_sorted':
+| ../../../../../git/src/plugins/ctf/fs-src/fs.c:702:5: error: 'other_entry' may be used uninitialized in this function [-Werror=maybe-uninitialized]
+| 702 | !ds_index_entries_equal(entry, other_entry)) {
+
+Upstream-Status: Submitted [https://lists.lttng.org/pipermail/lttng-dev/2020-March/029549.html]
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ src/plugins/ctf/fs-src/fs.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/plugins/ctf/fs-src/fs.c b/src/plugins/ctf/fs-src/fs.c
+index e87523a3..a6b5315f 100644
+--- a/src/plugins/ctf/fs-src/fs.c
++++ b/src/plugins/ctf/fs-src/fs.c
+@@ -680,7 +680,7 @@ void ds_index_insert_ds_index_entry_sorted(
+ struct ctf_fs_ds_index_entry *entry)
+ {
+ guint i;
+- struct ctf_fs_ds_index_entry *other_entry;
++ struct ctf_fs_ds_index_entry *other_entry = NULL;
+
+ /* Find the spot where to insert this index entry. */
+ for (i = 0; i < index->entries->len; i++) {
+--
+2.24.1
+
diff --git a/meta/recipes-kernel/lttng/babeltrace2_2.0.1.bb b/meta/recipes-kernel/lttng/babeltrace2_2.0.1.bb
index 61bc7f5e6b..e71ac1ad57 100644
--- a/meta/recipes-kernel/lttng/babeltrace2_2.0.1.bb
+++ b/meta/recipes-kernel/lttng/babeltrace2_2.0.1.bb
@@ -11,6 +11,7 @@ SRC_URI = "git://git.linuxfoundation.org/diamon/babeltrace.git;branch=stable-2.0
file://run-ptest \
file://0001-tests-do-not-run-test-applications-from-.libs.patch \
file://0001-Make-manpages-multilib-identical.patch \
+ file://0001-fs.c-initialize-other_entry.patch \
"
SRCREV = "06df58f89ee51b1a2c6a2c187ec3f15691633910"
UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>2(\.\d+)+)$"