This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix unused variable warning
authorJerry D. Hedden <jdhedden@cpan.org>
Mon, 23 Feb 2009 16:04:07 +0000 (11:04 -0500)
committerNicholas Clark <nick@ccl4.org>
Mon, 23 Feb 2009 16:18:06 +0000 (16:18 +0000)
Attached patch fixes the following build warnings:

perlmini.c: In function `S_incpush':
perlmini.c:4358: warning: unused variable `addoldvers'

perl.c: In function `S_incpush':
perl.c:4358: warning: unused variable `addoldvers'

From 87b6dbeb18691177a2b2e8dc971da242ac831c03 Mon Sep 17 00:00:00 2001
From: Jerry D. Hedden <jdhedden@cpan.org>
Date: Mon, 23 Feb 2009 10:58:14 -0500
Subject: [PATCH] Fix unused variable warning

perl.c

diff --git a/perl.c b/perl.c
index 684fd80..67b4d5b 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -4355,7 +4355,9 @@ S_incpush(pTHX_ const char *const dir, STRLEN len, U32 flags)
        = (U8)flags & INCPUSH_ADD_VERSIONED_SUB_DIRS;
     const U8 add_archonly_sub_dirs
        = (U8)flags & INCPUSH_ADD_ARCHONLY_SUB_DIRS;
+#ifdef PERL_INC_VERSION_LIST
     const U8 addoldvers  = (U8)flags & INCPUSH_ADD_OLD_VERS;
+#endif
     const U8 canrelocate = (U8)flags & INCPUSH_CAN_RELOCATE;
     const U8 unshift     = (U8)flags & INCPUSH_UNSHIFT;
     const U8 push_basedir = (flags & INCPUSH_NOT_BASEDIR) ? 0 : 1;