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 | 78e7b2f4b3fe63e9e9158ac13da7d5d619c27f78 (patch) | |
tree | 2cbc98f7dc26fa0c732fcf8f828b8e138e44af57 | |
parent | 298dc81b7310f9241ddf044efcffcf4593cb829b (diff) | |
download | perl_checker-78e7b2f4b3fe63e9e9158ac13da7d5d619c27f78.tar perl_checker-78e7b2f4b3fe63e9e9158ac13da7d5d619c27f78.tar.gz perl_checker-78e7b2f4b3fe63e9e9158ac13da7d5d619c27f78.tar.bz2 perl_checker-78e7b2f4b3fe63e9e9158ac13da7d5d619c27f78.tar.xz perl_checker-78e7b2f4b3fe63e9e9158ac13da7d5d619c27f78.zip |
fix --check-unused-global-vars
-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 |