tar: Make it build with GCC 8.3
PATCH 1/1 tar: Make it build with GCC 8.3
From: Joakim Roubert <[email protected]>
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,
^~~~~~~~~~~~--- ...-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
recipes-extended/tar/tar/0001-lib-argp-parse.c-Fix-compiler-error.patch new file +34 -0
@@ -0,0 +1,34 @@ +From 153c0aab9e2a4a97b1a2c6b530594cd9a211e9ec Mon Sep 17 00:00:00 2001 +From: Joakim Roubert <[email protected]> +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 <[email protected]> +--- + 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 +
recipes-extended/tar/tar_1.17.bb +1 -0
@@ -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"
Signature · 1 line
2.21.0
Missing an upstream-status, but good to push when that's fixed.
Ross
Quoted 71 lines · Peter Kjellerstedt
From: Joakim Roubert <[email protected]>
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 <[email protected]>Signed-off-by Peter Kjellerstedt <[email protected]>--- ...-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.patchrecipes-extended/tar/tar/0001-lib-argp-parse.c-Fix-compiler-error.patch new file +34
-0@@ -0,0 +1,34 @@ +From 153c0aab9e2a4a97b1a2c6b530594cd9a211e9ec Mon Sep 17 00:00:00 2001 +From: Joakim Roubert <[email protected]> +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 <[email protected]> +--- + 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 +recipes-extended/tar/tar_1.17.bb +1
-0@@ -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"
One of these days I will read my mail before I go pushing stuff... Anyway, the Upstream-Status has been added now.
//Peter
Quoted 101 lines
-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Ross Burton
Sent: den 20 september 2019 13:27
To: [email protected]
Subject: Re: [yocto] [meta-gplv2][master][warrior][PATCH] tar: Make it build with GCC 8.3Missing an upstream-status, but good to push when that's fixed.
Ross
Quoted 7 lines · Peter Kjellerstedt
From: Joakim Roubert <[email protected]>
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]Quoted 7 lines
__argp_error (state, dgettext (state->root_argp->argp_domain, ^~~~~~~~~~~~Signed-off-by Joakim Roubert <[email protected]>Signed-off-by Peter Kjellerstedt <[email protected]>--- ...-lib-argp-parse.c-Fix-compiler-error.patch | 34+++++++++++++++++++
Quoted 3 lines
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
Review
Quoted 2 lines
(quoted diff) +0
-0compiler-error.patch b/recipes-extended/tar/tar/0001-lib-argp-parse.c- Fix-compiler-error.patch
recipes-extended/tar/tar/0001-lib-argp-parse.c-Fix-compiler-
Quoted 4 lines
new file mode 100644
index 0000000..3de9fd1recipes-extended/tar/tar/0001-lib-argp-parse.c-Fix-compiler- new file +0
-0error.patch
recipes-extended/tar/tar/0001-lib-argp-parse.c-Fix-compiler- line 1
Quoted 2 lines
recipes-extended/tar/tar/0001-lib-argp-parse.c-Fix-compiler- new file +1
-0@@ -0,0 +1,34 @@ +From 153c0aab9e2a4a97b1a2c6b530594cd9a211e9ec Mon Sep 17 00:00:002001
Quoted 12 lines
recipes-extended/tar/tar/0001-lib-argp-parse.c-Fix-compiler- new file +12
-0+From: Joakim Roubert <[email protected]> +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, + ^~~~~~~~~~~~ +recipes-extended/tar/tar/0001-lib-argp-parse.c-Fix-compiler- line 23
Quoted 10 lines
recipes-extended/tar/tar/0001-lib-argp-parse.c-Fix-compiler- new file +10
-0+Signed-off-by: Joakim Roubert <[email protected]> +--- + 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)recipes-extended/tar/tar/0001-lib-argp-parse.c-Fix-compiler-
Quoted 8 lines
recipes-extended/tar/tar/0001-lib-argp-parse.c-Fix-compiler- new file +4
-0+ 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,recipes-extended/tar/tar/0001-lib-argp-parse.c-Fix-compiler- new file +1
-0+ "(PROGRAM ERROR) Noversion known!?"));
recipes-
Quoted 6 lines
recipes-extended/tar/tar/0001-lib-argp-parse.c-Fix-compiler- new file +5
-0+ if (! (state->flags & ARGP_NO_EXIT)) + exit (0); +-- +2.11.0 +recipes- renamed from recipes-extended/tar/tar_1.17.bb +0
-0extended/tar/tar_1.17.bb
recipes-extended/tar/tar_1.17.bb PR = "r3" · line 14
Quoted 12 lines
index b9ca206..1ee5e34 100644
recipes-extended/tar/tar_1.17.bb +1
-0@@ -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
[email protected]
https://lists.yoctoproject.org/listinfo/yocto