Accepting request 399629 from home:namtrac:branches:devel:languages:perl

- Add perl-avoid-warnings.patch to fix a warning in cop.h, which
  breaks perf build due to -Werror. Already upstream.

OBS-URL: https://build.opensuse.org/request/show/399629
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl?expand=0&rev=144
This commit is contained in:
Michael Schröder 2016-06-02 10:07:50 +00:00 committed by Git OBS Bridge
parent 3f325ce0cb
commit 0738c7fe8c
3 changed files with 43 additions and 0 deletions

34
perl-avoid-warnings.patch Normal file
View File

@ -0,0 +1,34 @@
From f2b9631d5d19d2b71c1776e1193173d13f3620bf Mon Sep 17 00:00:00 2001
From: David Mitchell <davem@iabyn.com>
Date: Mon, 23 May 2016 14:43:56 +0100
Subject: [PATCH] CX_POP_SAVEARRAY(): use more distinctive var name
Under -Wshadow, CX_POP_SAVEARRAY's local var 'av' can generate this
warning:
warning: declaration shadows a local variable [-Wshadow]
So rename it to cx_pop_savearay_av to reduce the risk of a clash.
(See http://nntp.perl.org/group/perl.perl5.porters/236444)
---
cop.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cop.h b/cop.h
index da29572..b371379 100644
--- a/cop.h
+++ b/cop.h
@@ -609,10 +609,10 @@ struct block_format {
/* Restore old @_ */
#define CX_POP_SAVEARRAY(cx) \
STMT_START { \
- AV *av = GvAV(PL_defgv); \
+ AV *cx_pop_savearray_av = GvAV(PL_defgv); \
GvAV(PL_defgv) = cx->blk_sub.savearray; \
cx->blk_sub.savearray = NULL; \
- SvREFCNT_dec(av); \
+ SvREFCNT_dec(cx_pop_savearray_av); \
} STMT_END
/* junk in @_ spells trouble when cloning CVs and in pp_caller(), so don't

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Jun 2 08:47:48 UTC 2016 - idonmez@suse.com
- Add perl-avoid-warnings.patch to fix a warning in cop.h, which
breaks perf build due to -Werror. Already upstream.
-------------------------------------------------------------------
Tue May 10 15:27:33 CEST 2016 - mls@suse.de

View File

@ -41,6 +41,8 @@ Patch7: perl-5.22.0_wrong_rpm_provides.diff
Patch8: skip_time_hires.patch
Patch9: perl-incfix.diff
Patch11: perl-5.18.2-overflow.diff
# PATCH-FIX-UPSTREAM Fix a warning in cop.h , upstream commit f2b9631d5d19d2b71c1776e1193173d13f3620bf
Patch12: perl-avoid-warnings.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: perl-base = %version
#PreReq: %fillup_prereq
@ -182,6 +184,7 @@ cp -p %{S:3} .
%endif
%patch9
%patch11
%patch12 -p1
%build
cp -a lib savelib