Missing an upstream-status, but good to push when that's fixed.

Ross

On 18/09/2019 16:48, Peter Kjellerstedt wrote:
From: Joakim Roubert <joak...@axis.com>

This avoids the following error:

   lib/argp-parse.c: In function 'argp_version_parser':
   lib/argp-parse.c:158:2: error: format not a string literal and no
   format arguments [-Werror=format-security]
     __argp_error (state, dgettext (state->root_argp->argp_domain,
     ^~~~~~~~~~~~

Signed-off-by: Joakim Roubert <joakim.roub...@axis.com>
Signed-off-by: Peter Kjellerstedt <peter.kjellerst...@axis.com>
---
  ...-lib-argp-parse.c-Fix-compiler-error.patch | 34 +++++++++++++++++++
  recipes-extended/tar/tar_1.17.bb              |  1 +
  2 files changed, 35 insertions(+)
  create mode 100644 
recipes-extended/tar/tar/0001-lib-argp-parse.c-Fix-compiler-error.patch

diff --git 
a/recipes-extended/tar/tar/0001-lib-argp-parse.c-Fix-compiler-error.patch 
b/recipes-extended/tar/tar/0001-lib-argp-parse.c-Fix-compiler-error.patch
new file mode 100644
index 0000000..3de9fd1
--- /dev/null
+++ b/recipes-extended/tar/tar/0001-lib-argp-parse.c-Fix-compiler-error.patch
@@ -0,0 +1,34 @@
+From 153c0aab9e2a4a97b1a2c6b530594cd9a211e9ec Mon Sep 17 00:00:00 2001
+From: Joakim Roubert <joak...@axis.com>
+Date: Thu, 6 Dec 2018 10:33:14 +0100
+Subject: [PATCH] lib/argp-parse.c: Fix compiler error
+
+This avoids the following error:
+
+  lib/argp-parse.c: In function 'argp_version_parser':
+  lib/argp-parse.c:158:2: error: format not a string literal and no
+  format arguments [-Werror=format-security]
+    __argp_error (state, dgettext (state->root_argp->argp_domain,
+    ^~~~~~~~~~~~
+
+Signed-off-by: Joakim Roubert <joakim.roub...@axis.com>
+---
+ lib/argp-parse.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/argp-parse.c b/lib/argp-parse.c
+index a7de729..09511ba 100644
+--- a/lib/argp-parse.c
++++ b/lib/argp-parse.c
+@@ -155,7 +155,7 @@ argp_version_parser (int key, char *arg, struct argp_state 
*state)
+       else if (argp_program_version)
+       fprintf (state->out_stream, "%s\n", argp_program_version);
+       else
+-      __argp_error (state, dgettext (state->root_argp->argp_domain,
++      __argp_error (state, "%s", dgettext (state->root_argp->argp_domain,
+                                      "(PROGRAM ERROR) No version known!?"));
+       if (! (state->flags & ARGP_NO_EXIT))
+       exit (0);
+--
+2.11.0
+
diff --git a/recipes-extended/tar/tar_1.17.bb b/recipes-extended/tar/tar_1.17.bb
index b9ca206..1ee5e34 100644
--- a/recipes-extended/tar/tar_1.17.bb
+++ b/recipes-extended/tar/tar_1.17.bb
@@ -8,6 +8,7 @@ PR = "r3"
  SRC_URI += "file://m4extensions.patch \
      file://gcc43build.patch \
      file://avoid_heap_overflow.patch \
+    file://0001-lib-argp-parse.c-Fix-compiler-error.patch \
      "
SRC_URI[md5sum] = "c6c4f1c075dbf0f75c29737faa58f290"


--
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to