Message ID | 20241211-fix_gcc14_libsha1-v1-1-c9647718ccc2@bootlin.com |
---|---|
State | Changes Requested |
Headers | show |
Series | package/libsha1: Fix gcc14 compilation in libsha1 | expand |
Hello Thomas, Thanks for the patch! On Wed, 11 Dec 2024 20:45:15 +0100 Thomas Bonnefille <thomas.bonnefille@bootlin.com> wrote: > GCC14 removed the implicit int support. > This commit adds a patch to libsha1 to fix an implicit int declaration > as recommended. > > Link: https://gcc.gnu.org/gcc-14/porting_to.html > > Signed-off-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com> How did you notice this issue? Is there an autobuilder failure? It looks like yes, so you should add: Fixes: http://autobuild.buildroot.net/results/87dc9ba9690cbb6a82875734ce9cb8dbaf878e46/ (hint: you can search autobuilder results by failure reason, using http://autobuild.buildroot.net/?reason=libsha% for example). > diff --git a/package/libsha1/0001-test-fix-gcc-14.x-compile-implicit-int.patch b/package/libsha1/0001-test-fix-gcc-14.x-compile-implicit-int.patch > new file mode 100644 > index 0000000000000000000000000000000000000000..e7316ba8fe55e5f5e35c9afa7e1d55185b0aeb1a > --- /dev/null > +++ b/package/libsha1/0001-test-fix-gcc-14.x-compile-implicit-int.patch > @@ -0,0 +1,37 @@ > +From 1987b5f2648c85536f19f11a88ba896953bd0258 Mon Sep 17 00:00:00 2001 > +From: Thomas Bonnefille <thomas.bonnefille@bootlin.com> > +Date: Wed, 11 Dec 2024 20:17:57 +0100 > +Subject: [PATCH] test: fix gcc-14.x compile (implicit int) > +MIME-Version: 1.0 > +Content-Type: text/plain; charset=UTF-8 > +Content-Transfer-Encoding: 8bit > + > +Fixes: > + > + test.c:14:8: error: type defaults to ‘int’ in declaration of ‘num_test’ [-Wimplicit-int] > + 14 | static num_test; > + | ^~~~~~~~ > + > +Upstream: https://github.com/pseiderer/libsha1/commit/d449f26f782be91b3847f88ed2bd937582a575b6 > + > +Signed-off-by: Peter Seiderer <ps.report@gmx.net> If the upstream is from Peter, he should appear as an author, and you should add your SoB below Peter's SoB. I'm not sure how you managed to generate the above patch, but you should have used git format-patch, which would have gotten the From: field properly pointing to Peter as the author. Could you adjust those details and send a v2? Thanks a lot! Thomas
diff --git a/package/libsha1/0001-test-fix-gcc-14.x-compile-implicit-int.patch b/package/libsha1/0001-test-fix-gcc-14.x-compile-implicit-int.patch new file mode 100644 index 0000000000000000000000000000000000000000..e7316ba8fe55e5f5e35c9afa7e1d55185b0aeb1a --- /dev/null +++ b/package/libsha1/0001-test-fix-gcc-14.x-compile-implicit-int.patch @@ -0,0 +1,37 @@ +From 1987b5f2648c85536f19f11a88ba896953bd0258 Mon Sep 17 00:00:00 2001 +From: Thomas Bonnefille <thomas.bonnefille@bootlin.com> +Date: Wed, 11 Dec 2024 20:17:57 +0100 +Subject: [PATCH] test: fix gcc-14.x compile (implicit int) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes: + + test.c:14:8: error: type defaults to ‘int’ in declaration of ‘num_test’ [-Wimplicit-int] + 14 | static num_test; + | ^~~~~~~~ + +Upstream: https://github.com/pseiderer/libsha1/commit/d449f26f782be91b3847f88ed2bd937582a575b6 + +Signed-off-by: Peter Seiderer <ps.report@gmx.net> +--- + test.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test.c b/test.c +index 21a6525..1ec89d3 100644 +--- a/test.c ++++ b/test.c +@@ -11,7 +11,7 @@ static void print_hex(const char* data, size_t size) + printf("%x%x", ((unsigned char)data[i])/16, ((unsigned char)data[i])%16); + } + +-static num_test; ++static int num_test; + + static int do_test(const char* data, size_t size, const char* expected_dgst) + { +-- +2.47.1 +
GCC14 removed the implicit int support. This commit adds a patch to libsha1 to fix an implicit int declaration as recommended. Link: https://gcc.gnu.org/gcc-14/porting_to.html Signed-off-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com> --- ...01-test-fix-gcc-14.x-compile-implicit-int.patch | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) --- base-commit: ed9da089449c53519be02204f97c3452abba5cc3 change-id: 20241211-fix_gcc14_libsha1-473a5f540eab Best regards,