Skip to content

Commit 864733a

Browse files
committed
patch 7.4.1693
Problem: Building the Perl interface gives compiler warnings. Solution: Remove a pragma. Add noreturn attributes. (Damien)
1 parent 9bd547a commit 864733a

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

src/if_perl.xs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
#ifdef __GNUC__
5353
# pragma GCC diagnostic push
5454
# pragma GCC diagnostic ignored "-Wunused-variable"
55-
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
5655
#endif
5756

5857
#include <EXTERN.h>
@@ -307,16 +306,18 @@ static void (*perl_free)(PerlInterpreter*);
307306
static int (*perl_run)(PerlInterpreter*);
308307
static int (*perl_parse)(PerlInterpreter*, XSINIT_t, int, char**, char**);
309308
static void* (*Perl_get_context)(void);
310-
static void (*Perl_croak)(pTHX_ const char*, ...);
309+
static void (*Perl_croak)(pTHX_ const char*, ...) __attribute__noreturn__;
311310
#ifdef PERL5101_OR_LATER
312311
/* Perl-5.18 has a different Perl_croak_xs_usage signature. */
313312
# if (PERL_REVISION == 5) && (PERL_VERSION >= 18)
314-
static void (*Perl_croak_xs_usage)(const CV *const, const char *const params);
313+
static void (*Perl_croak_xs_usage)(const CV *const, const char *const params)
314+
__attribute__noreturn__;
315315
# else
316-
static void (*Perl_croak_xs_usage)(pTHX_ const CV *const, const char *const params);
316+
static void (*Perl_croak_xs_usage)(pTHX_ const CV *const, const char *const params)
317+
__attribute__noreturn__;
317318
# endif
318319
#endif
319-
static void (*Perl_croak_nocontext)(const char*, ...);
320+
static void (*Perl_croak_nocontext)(const char*, ...) __attribute__noreturn__;
320321
static I32 (*Perl_dowantarray)(pTHX);
321322
static void (*Perl_free_tmps)(pTHX);
322323
static HV* (*Perl_gv_stashpv)(pTHX_ const char*, I32);
@@ -591,7 +592,9 @@ static struct {
591592
* "perl\lib\CORE\inline.h", after Perl_sv_free2 is defined.
592593
* The linker won't complain about undefined __impl_Perl_sv_free2. */
593594
#if (PERL_REVISION == 5) && (PERL_VERSION >= 18)
595+
# define PL_memory_wrap "panic: memory wrap" /* Dummy */
594596
# include <inline.h>
597+
# undef PL_memory_wrap
595598
#endif
596599

597600
/*
@@ -1516,7 +1519,8 @@ SetHeight(win, height)
15161519
curwin = savewin;
15171520

15181521
void
1519-
Cursor(VIWIN win, ...)
1522+
Cursor(win, ...)
1523+
VIWIN win
15201524

15211525
PPCODE:
15221526
if (items == 1)

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,8 @@ static char *(features[]) =
748748

749749
static int included_patches[] =
750750
{ /* Add new patch number below this line */
751+
/**/
752+
1693,
751753
/**/
752754
1692,
753755
/**/

0 commit comments

Comments
 (0)