summaryrefslogtreecommitdiff
path: root/source4/pidl/tests/Util.pm
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-01-09 06:02:41 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:37:17 -0500
commitcfa230c480b0c55a23e23dcb39e1b170da576c95 (patch)
treeff96974327bc4d771c6a07e11b1ff9f42ff6dbe3 /source4/pidl/tests/Util.pm
parente0e96ae80d21c6b94e05fbf3af457001a005ce09 (diff)
downloadsamba-cfa230c480b0c55a23e23dcb39e1b170da576c95.tar.gz
samba-cfa230c480b0c55a23e23dcb39e1b170da576c95.tar.bz2
samba-cfa230c480b0c55a23e23dcb39e1b170da576c95.zip
r20625: Fix couple of warnings.
(This used to be commit 203076129b967ccc6258e807280dc1b75583a064)
Diffstat (limited to 'source4/pidl/tests/Util.pm')
-rw-r--r--source4/pidl/tests/Util.pm12
1 files changed, 10 insertions, 2 deletions
diff --git a/source4/pidl/tests/Util.pm b/source4/pidl/tests/Util.pm
index 2f43abe1ed..cfa1422674 100644
--- a/source4/pidl/tests/Util.pm
+++ b/source4/pidl/tests/Util.pm
@@ -18,14 +18,22 @@ my $warnings = "";
undef &Parse::Pidl::warning;
*Parse::Pidl::warning = sub {
my ($e, $l) = @_;
- $warnings .= "$e->{FILE}:$e->{LINE}: $l\n";
+ if (defined($e)) {
+ $warnings .= "$e->{FILE}:$e->{LINE}: $l\n";
+ } else {
+ $warnings .= "$l\n";
+ }
};
my $errors = "";
undef &Parse::Pidl::error;
*Parse::Pidl::error = sub {
my ($e, $l) = @_;
- $errors .= "$e->{FILE}:$e->{LINE}: $l\n";
+ if (defined($e)) {
+ $errors .= "$e->{FILE}:$e->{LINE}: $l\n";
+ } else {
+ $errors .= "$l\n";
+ }
};
use Test::More;