diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-06-08 03:06:44 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-06-08 03:06:44 +0000 |
commit | 086281fa0220017e4dd7faad5158f12d75bf3c4b (patch) | |
tree | 67d7ee87c4a33d5894cbde4567f7ef168b0c7b32 /perl_checker.src | |
parent | dcf3d7a001ab7b83b5c944540293fbf2f4684b47 (diff) | |
download | perl-MDK-Common-086281fa0220017e4dd7faad5158f12d75bf3c4b.tar perl-MDK-Common-086281fa0220017e4dd7faad5158f12d75bf3c4b.tar.gz perl-MDK-Common-086281fa0220017e4dd7faad5158f12d75bf3c4b.tar.bz2 perl-MDK-Common-086281fa0220017e4dd7faad5158f12d75bf3c4b.tar.xz perl-MDK-Common-086281fa0220017e4dd7faad5158f12d75bf3c4b.zip |
fix --check-unused-global-vars
Diffstat (limited to 'perl_checker.src')
-rw-r--r-- | perl_checker.src/global_checks.ml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/perl_checker.src/global_checks.ml b/perl_checker.src/global_checks.ml index b0b8d7a..2b43152 100644 --- a/perl_checker.src/global_checks.ml +++ b/perl_checker.src/global_checks.ml @@ -500,7 +500,7 @@ let add_file_to_files per_files file = let check_unused_vars package = Hashtbl.iter (fun (context, name) (pos, is_used, _proto) -> - if not (!is_used != Access_various || List.mem name ["BEGIN"; "END"; "DESTROY"; "ISA"; "AUTOLOAD"; "EXPORT"; "EXPORT_OK"; "EXPORT_TAGS"]) then + if !is_used != Access_various && not (List.mem name ["BEGIN"; "END"; "DESTROY"; "ISA"; "AUTOLOAD"; "EXPORT"; "EXPORT_OK"; "EXPORT_TAGS"]) then warn_with_pos [Warn_unused_global_vars] pos (sprintf "unused %s%s::%s" (if context = I_func then "function " else "variable " ^ context2s context) package.package_name name) ) package.vars_declared |