From f7ca27b9ca318657b38688bf063a63d96b1e8c3a Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 5 Jan 2007 15:03:21 +0000 Subject: [PATCH] r20548: Remove unnecessary "use lib", fix warnings. (This used to be commit 30d721569fdf33e4784eb1f7c650e75ed1b80527) --- source4/pidl/lib/Parse/Pidl.pm | 4 ++-- source4/pidl/tests/Util.pm | 8 ++++---- source4/pidl/tests/ndr_align.pl | 1 - source4/pidl/tests/ndr_alloc.pl | 1 - source4/pidl/tests/ndr_array.pl | 1 - source4/pidl/tests/ndr_fullptr.pl | 1 - source4/pidl/tests/ndr_refptr.pl | 1 - source4/pidl/tests/ndr_represent.pl | 1 - source4/pidl/tests/ndr_simple.pl | 1 - source4/pidl/tests/ndr_string.pl | 1 - source4/pidl/tests/ndr_tagtype.pl | 1 - source4/pidl/tests/test_util.pl | 1 - 12 files changed, 6 insertions(+), 16 deletions(-) diff --git a/source4/pidl/lib/Parse/Pidl.pm b/source4/pidl/lib/Parse/Pidl.pm index a6fc4867c32..0c6e0e57279 100644 --- a/source4/pidl/lib/Parse/Pidl.pm +++ b/source4/pidl/lib/Parse/Pidl.pm @@ -17,13 +17,13 @@ use vars qw ( $VERSION ); $VERSION = '0.02'; -sub warning($$) +sub warning { my ($l,$m) = @_; print STDERR "$l->{FILE}:$l->{LINE}: warning: $m\n"; } -sub error($$) +sub error { my ($l,$m) = @_; print STDERR "$l->{FILE}:$l->{LINE}: error: $m\n"; diff --git a/source4/pidl/tests/Util.pm b/source4/pidl/tests/Util.pm index fdd3c421f6e..2f43abe1ed0 100644 --- a/source4/pidl/tests/Util.pm +++ b/source4/pidl/tests/Util.pm @@ -15,15 +15,15 @@ use lib "$RealBin/../lib"; use Parse::Pidl; my $warnings = ""; -sub Parse::Pidl::warning($$) -{ +undef &Parse::Pidl::warning; +*Parse::Pidl::warning = sub { my ($e, $l) = @_; $warnings .= "$e->{FILE}:$e->{LINE}: $l\n"; }; my $errors = ""; -sub Parse::Pidl::error($$) -{ +undef &Parse::Pidl::error; +*Parse::Pidl::error = sub { my ($e, $l) = @_; $errors .= "$e->{FILE}:$e->{LINE}: $l\n"; }; diff --git a/source4/pidl/tests/ndr_align.pl b/source4/pidl/tests/ndr_align.pl index 26f41377e7f..5117be95bd4 100755 --- a/source4/pidl/tests/ndr_align.pl +++ b/source4/pidl/tests/ndr_align.pl @@ -5,7 +5,6 @@ use strict; use Test::More tests => 5 * 8; use FindBin qw($RealBin); -use lib "$RealBin/../lib"; use lib "$RealBin"; use Util qw(test_samba4_ndr); diff --git a/source4/pidl/tests/ndr_alloc.pl b/source4/pidl/tests/ndr_alloc.pl index 039826e4eaa..61df1c3548f 100755 --- a/source4/pidl/tests/ndr_alloc.pl +++ b/source4/pidl/tests/ndr_alloc.pl @@ -5,7 +5,6 @@ use strict; use Test::More tests => 5 * 8; use FindBin qw($RealBin); -use lib "$RealBin/../lib"; use lib "$RealBin"; use Util qw(test_samba4_ndr); diff --git a/source4/pidl/tests/ndr_array.pl b/source4/pidl/tests/ndr_array.pl index b28070536ef..27f42cd3916 100755 --- a/source4/pidl/tests/ndr_array.pl +++ b/source4/pidl/tests/ndr_array.pl @@ -6,7 +6,6 @@ use strict; use Test::More tests => 8; use FindBin qw($RealBin); -use lib "$RealBin/../lib"; use lib "$RealBin"; use Util qw(test_samba4_ndr); diff --git a/source4/pidl/tests/ndr_fullptr.pl b/source4/pidl/tests/ndr_fullptr.pl index dabbc6f5b64..482edcf0300 100755 --- a/source4/pidl/tests/ndr_fullptr.pl +++ b/source4/pidl/tests/ndr_fullptr.pl @@ -6,7 +6,6 @@ use strict; use Test::More tests => 1 * 8; use FindBin qw($RealBin); -use lib "$RealBin/../lib"; use lib "$RealBin"; use Util qw(test_samba4_ndr); diff --git a/source4/pidl/tests/ndr_refptr.pl b/source4/pidl/tests/ndr_refptr.pl index 6940586f01a..0bc5fd94168 100755 --- a/source4/pidl/tests/ndr_refptr.pl +++ b/source4/pidl/tests/ndr_refptr.pl @@ -7,7 +7,6 @@ use strict; use Test::More tests => 22 * 8; use FindBin qw($RealBin); -use lib "$RealBin/../lib"; use lib "$RealBin"; use Util qw(test_samba4_ndr); diff --git a/source4/pidl/tests/ndr_represent.pl b/source4/pidl/tests/ndr_represent.pl index 93764451cf6..880ecba827c 100644 --- a/source4/pidl/tests/ndr_represent.pl +++ b/source4/pidl/tests/ndr_represent.pl @@ -5,7 +5,6 @@ use strict; use Test::More tests => 1 * 8; use FindBin qw($RealBin); -use lib "$RealBin/../lib"; use lib "$RealBin"; use Util qw(test_samba4_ndr); diff --git a/source4/pidl/tests/ndr_simple.pl b/source4/pidl/tests/ndr_simple.pl index 9535ee1fae7..02803ceea92 100755 --- a/source4/pidl/tests/ndr_simple.pl +++ b/source4/pidl/tests/ndr_simple.pl @@ -6,7 +6,6 @@ use strict; use Test::More tests => 8; use FindBin qw($RealBin); -use lib "$RealBin/../lib"; use lib "$RealBin"; use Util qw(test_samba4_ndr); diff --git a/source4/pidl/tests/ndr_string.pl b/source4/pidl/tests/ndr_string.pl index dd6afde2b26..23d94be6405 100755 --- a/source4/pidl/tests/ndr_string.pl +++ b/source4/pidl/tests/ndr_string.pl @@ -6,7 +6,6 @@ use strict; use Test::More tests => 3 * 8; use FindBin qw($RealBin); -use lib "$RealBin/../lib"; use lib "$RealBin"; use Util qw(test_samba4_ndr); diff --git a/source4/pidl/tests/ndr_tagtype.pl b/source4/pidl/tests/ndr_tagtype.pl index dcdbc224944..662985a646c 100755 --- a/source4/pidl/tests/ndr_tagtype.pl +++ b/source4/pidl/tests/ndr_tagtype.pl @@ -5,7 +5,6 @@ use strict; use Test::More tests => 1 * 8; use FindBin qw($RealBin); -use lib "$RealBin/../lib"; use lib "$RealBin"; use Util qw(test_samba4_ndr); diff --git a/source4/pidl/tests/test_util.pl b/source4/pidl/tests/test_util.pl index e6133727aff..2d59f6283bb 100755 --- a/source4/pidl/tests/test_util.pl +++ b/source4/pidl/tests/test_util.pl @@ -5,7 +5,6 @@ use strict; use Test::More tests => 6; use FindBin qw($RealBin); -use lib "$RealBin/../lib"; use lib "$RealBin"; use Util qw(test_warnings test_errors); use Parse::Pidl qw(warning error);