From 086281fa0220017e4dd7faad5158f12d75bf3c4b Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 8 Jun 2005 03:06:44 +0000 Subject: fix --check-unused-global-vars --- perl_checker.src/global_checks.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.1