File: gcc-15.patch

package info (click to toggle)
parted 3.6-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,884 kB
  • sloc: ansic: 78,720; sh: 12,612; makefile: 658; perl: 179; python: 84; asm: 36; sed: 16
file content (45 lines) | stat: -rw-r--r-- 1,796 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From 7a96e9d182e544007185af62df87e0a47dc9029d Mon Sep 17 00:00:00 2001
From: Rudi Heitbaum <rudi@heitbaum.com>
Date: Wed, 20 Nov 2024 12:22:22 +0000
Subject: 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>

Origin: upstream, https://git.savannah.gnu.org/cgit/parted.git/commit/?id=16343bda6ce0d41edf43f8dac368db3bbb63d271
Bug: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74444
Bug-Debian: https://bugs.debian.org/1097550
Last-Update: 2025-02-23

Patch-Name: gcc-15.patch
---
 parted/parted.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/parted/parted.c b/parted/parted.c
index 3abb52f9..fc2aeba1 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,