1
0
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:
Douglas Bagnall 2019-11-30 22:34:54 +13:00 committed by Andrew Bartlett
parent b6913830bf
commit efef4366f1
40 changed files with 40 additions and 3 deletions

View File

@ -12,7 +12,7 @@ require Exporter;
@EXPORT_OK = qw(warning error fatal $VERSION);
use strict;
use warnings;
use vars qw ( $VERSION );
$VERSION = '0.02';

View File

@ -11,6 +11,7 @@ use vars qw($VERSION);
$VERSION = '0.01';
use strict;
use warnings;
sub get_pointer_to($)
{

View File

@ -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';

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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';

View File

@ -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);

View File

@ -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);

View File

@ -11,6 +11,7 @@ $VERSION = '0.01';
use Parse::Pidl::Util qw(genpad);
use strict;
use warnings;
my($res);

View File

@ -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';

View File

@ -10,6 +10,7 @@ use vars qw($VERSION);
$VERSION = '0.01';
use strict;
use warnings;
sub GetArgumentProtoList($)
{

View File

@ -14,6 +14,7 @@ use vars qw($VERSION);
$VERSION = '0.01';
use strict;
use warnings;
my($res);

View File

@ -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';

View File

@ -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);

View File

@ -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($)

View File

@ -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);

View File

@ -7,6 +7,7 @@
package Parse::Pidl::Samba4::NDR::Server;
use strict;
use warnings;
use Parse::Pidl::Util;
use vars qw($VERSION);

View File

@ -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);

View File

@ -15,6 +15,7 @@ use vars qw($VERSION);
$VERSION = '0.01';
use strict;
use warnings;
sub new($) {
my ($class) = shift;

View File

@ -11,6 +11,7 @@ $VERSION = '0.01';
use Parse::Pidl::Util qw(genpad);
use strict;
use warnings;
my($res);

View File

@ -16,6 +16,7 @@ $VERSION = '0.01';
use Parse::Pidl::Util qw(has_property);
use strict;
use warnings;
my %types = ();

View File

@ -11,6 +11,7 @@ use vars qw($VERSION);
$VERSION = '0.01';
use strict;
use warnings;
use Parse::Pidl::Expr;
use Parse::Pidl qw(error);

View File

@ -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);

View File

@ -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);

View File

@ -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;

View File

@ -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";

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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";

View File

@ -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";

View File

@ -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);