aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-07-26 11:58:09 -0700
committerMartin Jansa <Martin.Jansa@gmail.com>2017-08-13 13:19:03 +0200
commit18835b0a5fdeeadcba1f9b6b2da67153ed6ac7b2 (patch)
tree24c8c50d5faf0717ab25bdb116ffe7fd404cddb9
parent664e550c767547fb0767c48a48e6b74a54cf4c78 (diff)
downloadmeta-openembedded-contrib-18835b0a5fdeeadcba1f9b6b2da67153ed6ac7b2.tar.gz
meta-openembedded-contrib-18835b0a5fdeeadcba1f9b6b2da67153ed6ac7b2.tar.bz2
meta-openembedded-contrib-18835b0a5fdeeadcba1f9b6b2da67153ed6ac7b2.zip
minicoredumper: Initialize struct config
Fixes build error with clang Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--meta-oe/recipes-kernel/minicoredumper/files/0001-minicoredumper-Initialize-pointer-to-config-struct-t.patch29
-rw-r--r--meta-oe/recipes-kernel/minicoredumper/minicoredumper_2.0.0.bb3
2 files changed, 31 insertions, 1 deletions
diff --git a/meta-oe/recipes-kernel/minicoredumper/files/0001-minicoredumper-Initialize-pointer-to-config-struct-t.patch b/meta-oe/recipes-kernel/minicoredumper/files/0001-minicoredumper-Initialize-pointer-to-config-struct-t.patch
new file mode 100644
index 0000000000..ad255fae06
--- /dev/null
+++ b/meta-oe/recipes-kernel/minicoredumper/files/0001-minicoredumper-Initialize-pointer-to-config-struct-t.patch
@@ -0,0 +1,29 @@
+From 6181d9c3c407ee030b4c3a94045318b9e3a3cc89 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 25 Jul 2017 14:08:54 -0700
+Subject: [PATCH] minicoredumper: Initialize pointer to config struct to null
+
+Fixes
+corestripper.c:3632:13: error: variable 'cfg' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/minicoredumper/corestripper.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/minicoredumper/corestripper.c b/src/minicoredumper/corestripper.c
+index a764073..ddb0d25 100644
+--- a/src/minicoredumper/corestripper.c
++++ b/src/minicoredumper/corestripper.c
+@@ -3605,7 +3605,7 @@ out:
+
+ static int do_all_dumps(struct dump_info *di, int argc, char *argv[])
+ {
+- struct config *cfg;
++ struct config *cfg = 0;
+ const char *recept;
+ bool live_dumper;
+ char *comm_base;
+--
+2.13.3
+
diff --git a/meta-oe/recipes-kernel/minicoredumper/minicoredumper_2.0.0.bb b/meta-oe/recipes-kernel/minicoredumper/minicoredumper_2.0.0.bb
index 58cd45a530..3bf9f66b98 100644
--- a/meta-oe/recipes-kernel/minicoredumper/minicoredumper_2.0.0.bb
+++ b/meta-oe/recipes-kernel/minicoredumper/minicoredumper_2.0.0.bb
@@ -16,7 +16,8 @@ PR .= "+git${SRCPV}"
SRC_URI = "git://github.com/Linutronix/minicoredumper-debian;branch=unstable \
file://minicoredumper.service \
file://minicoredumper.init \
-"
+ file://0001-minicoredumper-Initialize-pointer-to-config-struct-t.patch \
+ "
S = "${WORKDIR}/git"