mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
pidl: use perl warnings
Warnings are good. If we turn on warnings with 'use warnings', we will see bugs that have lain latent for years. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
b6913830bf
commit
efef4366f1
@ -12,7 +12,7 @@ require Exporter;
|
||||
@EXPORT_OK = qw(warning error fatal $VERSION);
|
||||
|
||||
use strict;
|
||||
|
||||
use warnings;
|
||||
use vars qw ( $VERSION );
|
||||
|
||||
$VERSION = '0.02';
|
||||
|
@ -11,6 +11,7 @@ use vars qw($VERSION);
|
||||
$VERSION = '0.01';
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
sub get_pointer_to($)
|
||||
{
|
||||
|
@ -8,6 +8,7 @@ package Parse::Pidl::Compat;
|
||||
use Parse::Pidl qw(warning);
|
||||
use Parse::Pidl::Util qw(has_property);
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use vars qw($VERSION);
|
||||
$VERSION = '0.01';
|
||||
|
@ -27,6 +27,7 @@ $VERSION = '0.01';
|
||||
@EXPORT_OK = qw(DumpType DumpTypedef DumpStruct DumpEnum DumpBitmap DumpUnion DumpFunction);
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Parse::Pidl::Util qw(has_property);
|
||||
|
||||
my($res);
|
||||
|
@ -10,6 +10,7 @@
|
||||
package Parse::Pidl::Expr;
|
||||
use vars qw ( @ISA );
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
@ISA= qw ( Parse::Yapp::Driver );
|
||||
use Parse::Yapp::Driver;
|
||||
|
@ -10,6 +10,7 @@
|
||||
package Parse::Pidl::IDL;
|
||||
use vars qw ( @ISA );
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
@ISA= qw ( Parse::Yapp::Driver );
|
||||
use Parse::Yapp::Driver;
|
||||
|
@ -38,6 +38,7 @@ $VERSION = '0.01';
|
||||
@EXPORT_OK = qw(GetElementLevelTable ParseElement ReturnTypeElement ValidElement align_type mapToScalar ParseType can_contain_deferred is_charset_array);
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Parse::Pidl qw(warning fatal);
|
||||
use Parse::Pidl::Typelist qw(hasType getType typeIs expandAlias mapScalarType is_fixed_size_scalar);
|
||||
use Parse::Pidl::Util qw(has_property property_matches);
|
||||
|
@ -10,6 +10,7 @@ use Parse::Pidl::Util qw(has_property unmake_str);
|
||||
use Parse::Pidl::Typelist qw(hasType getType);
|
||||
use File::Basename;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use vars qw($VERSION);
|
||||
$VERSION = '0.01';
|
||||
|
@ -9,6 +9,7 @@ package Parse::Pidl::Samba3::ClientNDR;
|
||||
use base Parse::Pidl::Base;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Parse::Pidl qw(fatal warning error);
|
||||
use Parse::Pidl::Util qw(has_property ParseExpr genpad);
|
||||
use Parse::Pidl::NDR qw(ContainsPipe);
|
||||
|
@ -11,6 +11,7 @@ use Exporter;
|
||||
@EXPORT_OK = qw(DeclLevel);
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Parse::Pidl qw(warning error fatal);
|
||||
use Parse::Pidl::Typelist qw(mapTypeName scalar_is_reference);
|
||||
use Parse::Pidl::Util qw(ParseExpr has_property is_constant);
|
||||
|
@ -11,6 +11,7 @@ $VERSION = '0.01';
|
||||
use Parse::Pidl::Util qw(genpad);
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my($res);
|
||||
|
||||
|
@ -14,6 +14,7 @@ use Parse::Pidl::NDR qw(GetNextLevel);
|
||||
use Parse::Pidl::Typelist qw(mapTypeName scalar_is_reference);
|
||||
use Parse::Pidl qw(fatal error);
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use vars qw($VERSION);
|
||||
$VERSION = '0.01';
|
||||
|
@ -10,6 +10,7 @@ use vars qw($VERSION);
|
||||
$VERSION = '0.01';
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
sub GetArgumentProtoList($)
|
||||
{
|
||||
|
@ -14,6 +14,7 @@ use vars qw($VERSION);
|
||||
$VERSION = '0.01';
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my($res);
|
||||
|
||||
|
@ -9,6 +9,7 @@ package Parse::Pidl::Samba4::COM::Stub;
|
||||
|
||||
use Parse::Pidl::Util qw(has_property);
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use vars qw($VERSION);
|
||||
$VERSION = '0.01';
|
||||
|
@ -11,6 +11,7 @@ require Exporter;
|
||||
@EXPORT_OK = qw(GenerateFunctionInEnv GenerateFunctionOutEnv EnvSubstituteValue GenerateStructEnv);
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Parse::Pidl qw(fatal);
|
||||
use Parse::Pidl::Typelist qw(mapTypeName scalar_is_reference);
|
||||
use Parse::Pidl::Util qw(has_property is_constant unmake_str ParseExpr);
|
||||
|
@ -19,6 +19,7 @@ use vars qw($VERSION);
|
||||
$VERSION = '0.01';
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
sub fn_declare($$) { my ($self,$n) = @_; $self->pidl($n); $self->pidl_hdr("$n;"); }
|
||||
sub new($)
|
||||
|
@ -13,6 +13,7 @@ push @ISA, qw(Exporter);
|
||||
@EXPORT_OK = qw(check_null_pointer NeededFunction NeededElement NeededType $res NeededInterface TypeFunctionName ParseElementPrint);
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Parse::Pidl::Typelist qw(hasType getType mapTypeName typeHasBody);
|
||||
use Parse::Pidl::Util qw(has_property ParseExpr ParseExprExt print_uuid unmake_str);
|
||||
use Parse::Pidl::CUtil qw(get_pointer_to get_value_of get_array_element);
|
||||
|
@ -7,6 +7,7 @@
|
||||
package Parse::Pidl::Samba4::NDR::Server;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Parse::Pidl::Util;
|
||||
|
||||
use vars qw($VERSION);
|
||||
|
@ -7,6 +7,7 @@ package Parse::Pidl::Samba4::Python;
|
||||
use parent Parse::Pidl::Base;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Parse::Pidl qw(warning fatal error);
|
||||
use Parse::Pidl::Typelist qw(hasType resolveType getType mapTypeName expandAlias bitmap_type_fn enum_type_fn);
|
||||
use Parse::Pidl::Util qw(has_property ParseExpr unmake_str);
|
||||
|
@ -15,6 +15,7 @@ use vars qw($VERSION);
|
||||
$VERSION = '0.01';
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
sub new($) {
|
||||
my ($class) = shift;
|
||||
|
@ -11,6 +11,7 @@ $VERSION = '0.01';
|
||||
use Parse::Pidl::Util qw(genpad);
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my($res);
|
||||
|
||||
|
@ -16,6 +16,7 @@ $VERSION = '0.01';
|
||||
|
||||
use Parse::Pidl::Util qw(has_property);
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my %types = ();
|
||||
|
||||
|
@ -11,6 +11,7 @@ use vars qw($VERSION);
|
||||
$VERSION = '0.01';
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Parse::Pidl::Expr;
|
||||
use Parse::Pidl qw(error);
|
||||
|
@ -115,6 +115,7 @@ $VERSION = '0.01';
|
||||
@EXPORT_OK = qw(ReadConformance ReadConformanceFH valid_ft_type valid_base_type);
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Parse::Pidl qw(fatal warning error);
|
||||
use Parse::Pidl::Util qw(has_property);
|
||||
|
@ -21,6 +21,7 @@ use Exporter;
|
||||
@EXPORT_OK = qw(field2name %res PrintIdl StripPrefixes RegisterInterfaceHandoff register_hf_field CheckUsed ProcessImport ProcessInclude find_type DumpEttList DumpEttDeclaration DumpHfList DumpHfDeclaration DumpFunctionTable register_type register_ett);
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Parse::Pidl qw(error warning);
|
||||
use Parse::Pidl::Typelist qw(getType);
|
||||
use Parse::Pidl::Util qw(has_property property_matches make_str);
|
||||
|
@ -402,6 +402,7 @@ pidl README by Andrew Tridgell.
|
||||
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use FindBin qw($RealBin $Script);
|
||||
use lib "$RealBin/lib";
|
||||
use Getopt::Long;
|
||||
|
@ -9,6 +9,7 @@ require Exporter;
|
||||
@EXPORT = qw(test_samba4_ndr test_warnings test_errors);
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use FindBin qw($RealBin);
|
||||
use lib "$RealBin/../lib";
|
||||
|
@ -2,6 +2,7 @@
|
||||
# NDR alignment tests
|
||||
# (C) 2005 Jelmer Vernooij. Published under the GNU GPL
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Test::More tests => 5 * 8;
|
||||
use FindBin qw($RealBin);
|
||||
|
@ -2,6 +2,7 @@
|
||||
# NDR allocation tests
|
||||
# (C) 2005 Jelmer Vernooij. Published under the GNU GPL
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Test::More tests => 5 * 8;
|
||||
use FindBin qw($RealBin);
|
||||
|
@ -3,6 +3,7 @@
|
||||
# (C) 2005 Jelmer Vernooij <jelmer@samba.org>
|
||||
# Published under the GNU General Public License
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Test::More tests => 8;
|
||||
use FindBin qw($RealBin);
|
||||
|
@ -2,6 +2,7 @@
|
||||
# (C) 2007 Jelmer Vernooij <jelmer@samba.org>
|
||||
# Published under the GNU General Public License
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Test::More tests => 2;
|
||||
use FindBin qw($RealBin);
|
||||
|
@ -3,6 +3,7 @@
|
||||
# (C) 2006 Jelmer Vernooij <jelmer@samba.org>.
|
||||
# Published under the GNU General Public License.
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Test::More tests => 1 * 8;
|
||||
use FindBin qw($RealBin);
|
||||
|
@ -4,6 +4,7 @@
|
||||
# (C) 2005 Jelmer Vernooij <jelmer@samba.org>.
|
||||
# Published under the GNU General Public License.
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Test::More tests => 22 * 8;
|
||||
use FindBin qw($RealBin);
|
||||
|
@ -2,6 +2,7 @@
|
||||
# NDR represent_as() / transmit_as() tests
|
||||
# (C) 2006 Jelmer Vernooij. Published under the GNU GPL
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Test::More tests => 2 * 8;
|
||||
use FindBin qw($RealBin);
|
||||
|
@ -3,6 +3,7 @@
|
||||
# (C) 2005 Jelmer Vernooij <jelmer@samba.org>
|
||||
# Published under the GNU General Public License
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Test::More tests => 8;
|
||||
use FindBin qw($RealBin);
|
||||
|
@ -3,6 +3,7 @@
|
||||
# (C) 2005 Jelmer Vernooij <jelmer@samba.org>
|
||||
# Published under the GNU General Public License
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Test::More tests => 6 * 8;
|
||||
use FindBin qw($RealBin);
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Support for tagged types
|
||||
# (C) 2005 Jelmer Vernooij. Published under the GNU GPL
|
||||
use strict;
|
||||
|
||||
use warnings;
|
||||
use Test::More tests => 3 * 8;
|
||||
use FindBin qw($RealBin);
|
||||
use lib "$RealBin";
|
||||
|
@ -3,7 +3,7 @@
|
||||
# (C) 2005 Jelmer Vernooij <jelmer@samba.org>
|
||||
# Published under the GNU General Public License
|
||||
use strict;
|
||||
|
||||
use warnings;
|
||||
use Test::More tests => 65 * 2 + 7;
|
||||
use FindBin qw($RealBin);
|
||||
use lib "$RealBin";
|
||||
|
@ -2,6 +2,7 @@
|
||||
# (C) 2007 Jelmer Vernooij <jelmer@samba.org>
|
||||
# Published under the GNU General Public License
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Test::More tests => 6;
|
||||
use FindBin qw($RealBin);
|
||||
|
Loading…
Reference in New Issue
Block a user