From 0039049fb1d76afef05d550823b27731ad7d7b3d Mon Sep 17 00:00:00 2001 From: Andrew Dunstan Date: Thu, 31 May 2018 08:13:02 -0400 Subject: Fix compile-time warnings on all perl code This patch does two things. First, it silences a number of compile-time warnings in the msvc tools files, mainly those due to the fact that in some cases we have more than one package per file. Second it supplies a dummy Perl library with just enough of the Windows API referred to in our code to let it run these checks cleanly, even on Unix machines where the code is never supposed to run. The dummy library should only be used for that purpose, as its README notes. --- src/tools/msvc/MSBuildProject.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/tools/msvc/MSBuildProject.pm') diff --git a/src/tools/msvc/MSBuildProject.pm b/src/tools/msvc/MSBuildProject.pm index 27397ba3fb..948c548aed 100644 --- a/src/tools/msvc/MSBuildProject.pm +++ b/src/tools/msvc/MSBuildProject.pm @@ -11,6 +11,8 @@ use strict; use warnings; use base qw(Project); +no warnings qw(redefine); ## no critic + sub _new { my $classname = shift; @@ -399,6 +401,8 @@ use strict; use warnings; use base qw(MSBuildProject); +no warnings qw(redefine); ## no critic + sub new { my $classname = shift; @@ -420,6 +424,8 @@ use strict; use warnings; use base qw(MSBuildProject); +no warnings qw(redefine); ## no critic + sub new { my $classname = shift; @@ -464,6 +470,8 @@ use strict; use warnings; use base qw(VC2012Project); +no warnings qw(redefine); ## no critic + sub new { my $classname = shift; @@ -487,6 +495,8 @@ use strict; use warnings; use base qw(VC2012Project); +no warnings qw(redefine); ## no critic + sub new { my $classname = shift; @@ -510,6 +520,8 @@ use strict; use warnings; use base qw(VC2012Project); +no warnings qw(redefine); ## no critic + sub new { my $classname = shift; -- cgit v1.2.1