diff mbox series

[oe,meta-oe,02/17] ltrace: Fix FTBFS due to invalid code in ARM support

Message ID 20170424052058.4952-2-raj.khem@gmail.com
State Accepted
Commit 2f6193d78faf69aea4018e624a2402db615b11e7
Headers show
Series [oe,meta-multimedia,01/17] musicbrainz: Upgrade to 5.1.0 | expand

Commit Message

Khem Raj April 24, 2017, 5:20 a.m. UTC
Found with gcc7

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 ...s-unreachable-code-after-switch-statement.patch | 40 ++++++++++++++++++++++
 meta-oe/recipes-devtools/ltrace/ltrace_git.bb      |  3 +-
 2 files changed, 42 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-devtools/ltrace/ltrace/0001-ARM-code-has-unreachable-code-after-switch-statement.patch

-- 
2.12.2

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff mbox series

Patch

diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-ARM-code-has-unreachable-code-after-switch-statement.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-ARM-code-has-unreachable-code-after-switch-statement.patch
new file mode 100644
index 000000000..4d0e0392f
--- /dev/null
+++ b/meta-oe/recipes-devtools/ltrace/ltrace/0001-ARM-code-has-unreachable-code-after-switch-statement.patch
@@ -0,0 +1,40 @@ 
+From 95ff340a74af16cca89fd5c5ca99890821053209 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 22 Apr 2017 00:47:16 -0700
+Subject: [PATCH] ARM code has unreachable code after switch statement move
+ initialization
+
+Fixed
+sysdeps/linux-gnu/arm/trace.c:173:33: error: statement will never be executed [-Werror=switch-unreachable]
+    uint32_t operand1, operand2, result = 0;
+                                 ^~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ sysdeps/linux-gnu/arm/trace.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/sysdeps/linux-gnu/arm/trace.c b/sysdeps/linux-gnu/arm/trace.c
+index 5e51e91..f974d1f 100644
+--- a/sysdeps/linux-gnu/arm/trace.c
++++ b/sysdeps/linux-gnu/arm/trace.c
+@@ -155,6 +155,8 @@ arm_get_next_pcs(struct process *proc,
+ 	const unsigned cond = BITS(this_instr, 28, 31);
+ 	const unsigned opcode = BITS(this_instr, 24, 27);
+ 
++	uint32_t operand1, operand2, result = 0;
++
+ 	if (cond == COND_NV)
+ 		switch (opcode) {
+ 			arch_addr_t addr;
+@@ -170,7 +172,6 @@ arm_get_next_pcs(struct process *proc,
+ 		}
+ 	else
+ 		switch (opcode) {
+-			uint32_t operand1, operand2, result = 0;
+ 		case 0x0:
+ 		case 0x1:			/* data processing */
+ 		case 0x2:
+-- 
+2.12.2
+
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
index a5960f5b0..60af5425e 100644
--- a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
+++ b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
@@ -20,7 +20,8 @@  SRC_URI = "git://anonscm.debian.org/collab-maint/ltrace.git;branch=master \
            file://0001-replace-readdir_r-with-readdir.patch \
            file://0001-Use-correct-enum-type.patch \
            file://0002-Fix-const-qualifier-error.patch \
-          "
+           file://0001-ARM-code-has-unreachable-code-after-switch-statement.patch \
+           "
 S = "${WORKDIR}/git"
 
 inherit autotools