Control: tag -1 patch

On Wed, Jul 03, 2024 at 12:39:56PM +0000, Matthias Klose wrote:
> Package: src:perl4caml
> Version: 0.9.5-7
> Severity: important
> Tags: sid trixie
> User: debian-...@lists.debian.org
> Usertags: ftbfs-gcc-14

> perl_c.c: In function ‘perl4caml_init’:
> perl_c.c:97:25: error: passing argument 2 of ‘Perl_sys_init’ from 
> incompatible pointer type [-Wincompatible-pointer-types]
>    97 |   PERL_SYS_INIT (&argc, &argv);
>       |                         ^~~~~
>       |                         |
>       |                         char * (*)[5]
> /usr/lib/x86_64-linux-gnu/perl/5.38/CORE/perl.h:3608:61: note: in definition 
> of macro ‘PERL_SYS_INIT’
>  3608 | #define PERL_SYS_INIT(argc, argv)       Perl_sys_init(argc, argv)
>       |                                                             ^~~~
> In file included from /usr/lib/x86_64-linux-gnu/perl/5.38/CORE/perl.h:6188:
> /usr/lib/x86_64-linux-gnu/perl/5.38/CORE/proto.h:4992:34: note: expected 
> ‘char ***’ but argument is of type ‘char * (*)[5]’
>  4992 | Perl_sys_init(int *argc, char ***argv);

Trivial proposed patch attached. The package builds again for me with
this.

I didn't test the resulting binaries, but the test suite passed as
part of the build.

Hope this helps,
-- 
Niko Tyni   nt...@debian.org
From: Niko Tyni <nt...@debian.org>
Date: Mon, 5 Aug 2024 08:25:38 +0100
X-Dgit-Generated: 0.9.5-7 9ef3820903b740c2c2bdf11792dff3a164372d9a
Subject: Add type cast to placate GCC-14

Bug-Debian: https://bugs.debian.org/1075378

---

diff --git a/perl_c.c b/perl_c.c
index ce53667..83f9332 100644
--- a/perl_c.c
+++ b/perl_c.c
@@ -94,7 +94,7 @@ perl4caml_init (value unit)
   int argc = 4;
   static char *argv[] = { "", "-w", "-e", "0", NULL };
 
-  PERL_SYS_INIT (&argc, &argv);
+  PERL_SYS_INIT (&argc, (char ***) &argv);
   my_perl = perl_alloc ();
   perl_construct (my_perl);
   PL_exit_flags |= PERL_EXIT_DESTRUCT_END;

Reply via email to