Subject: bug#74444: closed (Re: bug#74444: [PATCH] parted: fix do_version declaration)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 20 Nov 2024 17:07:02 +0000

Your bug report

#74444: [PATCH] parted: fix do_version declaration

which was filed against the parted package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
74444: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74444
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#74444: [PATCH] parted: fix do_version declaration
From: "Brian C. Lane" <[email-masked]>
To: Rudi Heitbaum <[email-masked]>
Cc: [email-masked]
Date: Wed, 20 Nov 2024 09:06:34 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

On Wed, Nov 20, 2024 at 12:22:22PM +0000, Rudi Heitbaum wrote:

>  static int
> -do_version ()
> +do_version (PedDevice** dev, PedDisk** diskp)
>  {
>      printf ("\n%s\n%s",
>              prog_name,

Thanks!

Brian

-- 
Brian C. Lane (PST8PDT) - weldr.io - lorax - parted - pykickstart

Subject: [PATCH] parted: fix do_version declaration
From: Rudi Heitbaum <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Wed, 20 Nov 2024 12:22:22 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

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 <[email-masked]>
---
 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.43.0