diff mbox series

[3/5] pax: Fix build with gcc7

Message ID 20170420023147.1868-3-raj.khem@gmail.com
State Accepted
Commit 9c222c25e6a8b0414eee3e5f2e7c018b0c51ca4f
Headers show
Series [1/5] nss: Update to 3.29.1 | expand

Commit Message

Khem Raj April 20, 2017, 2:31 a.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 .../pax/0001-Add-a-comment-for-fallthrough.patch   | 38 ++++++++++++++++++++++
 meta/recipes-extended/pax/pax_3.4.bb               |  9 ++---
 2 files changed, 43 insertions(+), 4 deletions(-)
 create mode 100644 meta/recipes-extended/pax/pax/0001-Add-a-comment-for-fallthrough.patch

-- 
2.12.2

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

Patch

diff --git a/meta/recipes-extended/pax/pax/0001-Add-a-comment-for-fallthrough.patch b/meta/recipes-extended/pax/pax/0001-Add-a-comment-for-fallthrough.patch
new file mode 100644
index 00000000000..b76f85aa458
--- /dev/null
+++ b/meta/recipes-extended/pax/pax/0001-Add-a-comment-for-fallthrough.patch
@@ -0,0 +1,38 @@ 
+From e67bb3debe582f0e77770b714bd012bb1082fc41 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 19 Apr 2017 11:32:00 -0700
+Subject: [PATCH] Add a comment for fallthrough
+
+Fixes warnings with gcc7 e.g.
+
+../../../../../../../workspace/sources/pax/src/options.c: In function 'tar_options':
+../../../../../../../workspace/sources/pax/src/options.c:725:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
+    if (opt_add ("write_opt=nodir") < 0)
+       ^
+../../../../../../../workspace/sources/pax/src/options.c:730:2: note: here
+  case 'O':
+  ^~~~
+cc1: all warnings being treated as errors
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/options.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/options.c b/src/options.c
+index c663b4e..b80819a 100644
+--- a/src/options.c
++++ b/src/options.c
+@@ -724,6 +724,7 @@ tar_options (int argc, char **argv)
+ 	case 'o':
+ 	  if (opt_add ("write_opt=nodir") < 0)
+ 	    tar_usage ();
++	  /* fallthru */
+ 	case 'O':
+ 	  Oflag = 1;
+ 	  break;
+-- 
+2.12.2
+
diff --git a/meta/recipes-extended/pax/pax_3.4.bb b/meta/recipes-extended/pax/pax_3.4.bb
index 9b4e17b3df7..6df9a8186b6 100644
--- a/meta/recipes-extended/pax/pax_3.4.bb
+++ b/meta/recipes-extended/pax/pax_3.4.bb
@@ -15,10 +15,11 @@  PR = "r2"
 DEPENDS_append_libc-musl = " fts "
 
 SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/${BPN}/${BP}.tar.bz2/fbd9023b590b45ac3ade95870702a0d6/${BP}.tar.bz2 \
-	file://fix_for_compile_with_gcc-4.6.0.patch \
-	file://pax-3.4_fix_for_x32.patch \
-        file://0001-include-sys-sysmacros.h-for-major-minor-definitions.patch \
-"
+           file://fix_for_compile_with_gcc-4.6.0.patch \
+           file://pax-3.4_fix_for_x32.patch \
+           file://0001-include-sys-sysmacros.h-for-major-minor-definitions.patch \
+           file://0001-Add-a-comment-for-fallthrough.patch \
+           "
 
 SRC_URI_append_libc-musl = " file://0001-Fix-build-with-musl.patch \
                              file://0001-use-strtoll-instead-of-strtoq.patch \