From 14b5a19486f80d06a4057092625309587737bebb Mon Sep 17 00:00:00 2001 From: Yegor Yefremov Date: Mon, 7 Jul 2025 12:18:37 +0200 Subject: [PATCH] package/parted: fix compilation with gcc-15 With gcc 15-20241117 compile fails with the below error, update the do_version declaration to match the header in command.h ../../parted/parted.c: In function '_init_commands': ../../parted/parted.c:2469:9: error: passing argument 2 of 'command_create' from incompatible pointer type [-Wincompatible-pointer-types] 2469 | do_version, | ^~~~~~~~~~ | | | int (*)(void) In file included from ../../parted/parted.c:28: ../../parted/command.h:35:39: note: expected 'int (*)(PedDevice **, PedDisk **)' {aka 'int (*)(struct _PedDevice **, struct _PedDisk **)'} but argument is of type 'int (*)(void)' 35 | int (*method) (PedDevice** dev, PedDisk** diskp), | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Upstream: https://cgit.git.savannah.gnu.org/cgit/parted.git/commit/?id=16343bda6ce0d41edf43f8dac368db3bbb63d271 Fixes: https://autobuild.buildroot.org/results/283f52d50ffef91d82a1bdc1f4dde1d54c5ffc23/build-end.log Signed-off-by: Yegor Yefremov [Julien: reword commit title] Signed-off-by: Julien Olivain --- ...CH-parted-fix-do_version-declaration.patch | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 package/parted/0001-bug-74444-PATCH-parted-fix-do_version-declaration.patch diff --git a/package/parted/0001-bug-74444-PATCH-parted-fix-do_version-declaration.patch b/package/parted/0001-bug-74444-PATCH-parted-fix-do_version-declaration.patch new file mode 100644 index 0000000000..78709e07ad --- /dev/null +++ b/package/parted/0001-bug-74444-PATCH-parted-fix-do_version-declaration.patch @@ -0,0 +1,44 @@ +From 16343bda6ce0d41edf43f8dac368db3bbb63d271 Mon Sep 17 00:00:00 2001 +From: Rudi Heitbaum +Date: Wed, 20 Nov 2024 12:22:22 +0000 +Subject: [PATCH] bug#74444: [PATCH] parted: fix do_version declaration + +With gcc 15-20241117 compile fails with the below error, update the +do_version declaration to match the header in command.h + +../../parted/parted.c: In function '_init_commands': +../../parted/parted.c:2469:9: error: passing argument 2 of 'command_create' from incompatible pointer type [-Wincompatible-pointer-types] + 2469 | do_version, + | ^~~~~~~~~~ + | | + | int (*)(void) +In file included from ../../parted/parted.c:28: +../../parted/command.h:35:39: note: expected 'int (*)(PedDevice **, PedDisk **)' {aka 'int (*)(struct _PedDevice **, struct _PedDisk **)'} but argument is of type 'int (*)(void)' + 35 | int (*method) (PedDevice** dev, PedDisk** diskp), + | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Upstream: https://cgit.git.savannah.gnu.org/cgit/parted.git/commit/?id=16343bda6ce0d41edf43f8dac368db3bbb63d271 + +Signed-off-by: Rudi Heitbaum +Signed-off-by: Brian C. Lane +Signed-off-by: Yegor Yefremov +--- + parted/parted.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/parted/parted.c b/parted/parted.c +index 3abb52f..fc2aeba 100644 +--- a/parted/parted.c ++++ b/parted/parted.c +@@ -2172,7 +2172,7 @@ do_unit (PedDevice** dev, PedDisk** diskp) + } + + static int +-do_version () ++do_version (PedDevice** dev, PedDisk** diskp) + { + printf ("\n%s\n%s", + prog_name, +-- +2.34.1 +