38 lines
1.5 KiB
Diff
38 lines
1.5 KiB
Diff
|
commit 16343bda6ce0d41edf43f8dac368db3bbb63d271
|
||
|
Author: Rudi Heitbaum <rudi@heitbaum.com>
|
||
|
Date: Wed Nov 20 12:22:22 2024 +0000
|
||
|
|
||
|
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),
|
||
|
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||
|
|
||
|
Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
|
||
|
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
||
|
|
||
|
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,
|
||
|
|