From: Richard W.M. Jones Date: Tue, 30 Jan 2024 12:41:12 +0000 (+0000) Subject: perl_c.c: Fix declaration of argv X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=d4a13a071b6bf7a04a79fc3326175193f920aea3;p=perl4caml.git perl_c.c: Fix declaration of argv In 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/lib64/perl5/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/lib64/perl5/CORE/perl.h:6188: /usr/lib64/perl5/CORE/proto.h:4992:34: note: expected ‘char ***’ but argument is of type ‘char * (*)[5]’ 4992 | Perl_sys_init(int *argc, char ***argv); | ~~~~~~~~^~~~ --- 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;