diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-04-25 15:16:22 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-04-25 15:16:22 +0000 |
commit | f37d7371879e2b1e2d923ec12762430b3d1937fc (patch) | |
tree | 28155bfc9dca9815ac7e8c7599130a15b1d2cb1b /src/global_checks.ml | |
parent | be4fff49f0164e606d4b2f76f64d4d108895f236 (diff) | |
download | perl_checker-1.2.3.tar perl_checker-1.2.3.tar.gz perl_checker-1.2.3.tar.bz2 perl_checker-1.2.3.tar.xz perl_checker-1.2.3.zip |
Diffstat (limited to 'src/global_checks.ml')
-rw-r--r-- | src/global_checks.ml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/global_checks.ml b/src/global_checks.ml index a63e652..4a97221 100644 --- a/src/global_checks.ml +++ b/src/global_checks.ml @@ -174,7 +174,7 @@ let is_global_var context ident = | _ -> false) | I_hash -> (match ident with - | "ENV" | "SIG" -> true + | "ENV" | "SIG" | "INC" -> true | _ -> false) | I_star -> (match ident with @@ -183,7 +183,7 @@ let is_global_var context ident = | _ -> false) | I_func -> (match ident with - | "-b" | "-c" | "-d" | "-e" | "-f" | "-l" | "-r" | "-s" | "-w" | "-x" + | "-b" | "-c" | "-d" | "-e" | "-f" | "-l" | "-r" | "-s" | "-w" | "-x" | "-z" | "-t" | "abs" | "alarm" | "atan2" | "bless" | "caller" | "chdir" | "chmod" | "chomp" | "chop" | "chown" | "chr" | "chroot" | "close" | "closedir" | "cos" | "crypt" | "defined" | "delete" | "die" @@ -399,7 +399,7 @@ let check_variables vars t = | Call_op("if infix", [List [My_our _]; List [Num("0", _)]], _) -> None (* special allowed case *) | Call_op(op, List (My_our _ :: _) :: _, pos) - | Call_op(op, My_our _ :: _, pos) + | Call_op(op, My_our("my", _, _) :: _, pos) | Call_op(op, Call_op("local", _, _) :: _, pos) -> if op <> "=" then warn_with_pos [Warn_traps] pos (sprintf "applying %s on a new initialized variable is wrong" op); None |