diff options
author | Michael G. Schwern <schwern@pobox.com> | 2007-12-23 03:56:08 -0800 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2008-01-06 17:14:22 +0000 |
commit | 74295f0bd81452f77ee575c561ad4d9e83dca07d (patch) | |
tree | 4b70988f26b7bf40927509cbcec2cf2503e6eacf /t/lib/warnings/op | |
parent | e846cbe53fd65a133ee59961dd2b0d9ae211552a (diff) | |
download | perl-74295f0bd81452f77ee575c561ad4d9e83dca07d.tar.gz |
Re: grep and smart match should warn in void context
Message-ID: <476EBD58.9050505@pobox.com>
p4raw-id: //depot/perl@32876
Diffstat (limited to 't/lib/warnings/op')
-rw-r--r-- | t/lib/warnings/op | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/t/lib/warnings/op b/t/lib/warnings/op index a7445906e6..c201a02416 100644 --- a/t/lib/warnings/op +++ b/t/lib/warnings/op @@ -211,6 +211,9 @@ eval { getgrgid 1 }; # OP_GGRGID eval { getpwnam 1 }; # OP_GPWNAM eval { getpwuid 1 }; # OP_GPWUID prototype "foo"; # OP_PROTOTYPE +grep /42/, (1,2); # OP_GREP +$a ~~ $b; # OP_SMARTMATCH +$a <=> $b; # OP_NCMP EXPECT Useless use of repeat (x) in void context at - line 3. Useless use of wantarray in void context at - line 5. @@ -250,6 +253,9 @@ Useless use of getgrgid in void context at - line 51. Useless use of getpwnam in void context at - line 52. Useless use of getpwuid in void context at - line 53. Useless use of subroutine prototype in void context at - line 54. +Useless use of grep in void context at - line 55. +Useless use of smart match in void context at - line 56. +Useless use of numeric comparison (<=>) in void context at - line 57. ######## # op.c use warnings 'void' ; close STDIN ; |