Change 18020 by rgs@rgs-home on 2002/10/16 18:43:21

        prototype() didn't warn when used in void context.

Affected files ...

.... //depot/perl/op.c#524 edit
.... //depot/perl/t/lib/warnings/op#16 edit

Differences ...

==== //depot/perl/op.c#524 (text) ====
Index: perl/op.c
--- perl/op.c#523~17973~        Thu Oct  3 13:34:13 2002
+++ perl/op.c   Wed Oct 16 11:43:21 2002
@@ -725,6 +725,7 @@
     case OP_GGRNAM:
     case OP_GGRGID:
     case OP_GETLOGIN:
+    case OP_PROTOTYPE:
       func_ops:
        if (!(o->op_private & (OPpLVAL_INTRO|OPpOUR_INTRO)))
            useless = OP_DESC(o);

==== //depot/perl/t/lib/warnings/op#16 (text) ====
Index: perl/t/lib/warnings/op
--- perl/t/lib/warnings/op#15~17972~    Thu Oct  3 13:26:54 2002
+++ perl/t/lib/warnings/op      Wed Oct 16 11:43:21 2002
@@ -298,6 +298,7 @@
 eval { getgrgid 1 };   # OP_GGRGID
 eval { getpwnam 1 };   # OP_GPWNAM
 eval { getpwuid 1 };   # OP_GPWUID
+prototype "foo";       # OP_PROTOTYPE
 EXPECT
 Useless use of repeat (x) in void context at - line 3.
 Useless use of wantarray in void context at - line 5.
@@ -336,6 +337,7 @@
 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.
 ########
 # op.c
 use warnings 'void' ; close STDIN ;
@@ -398,6 +400,7 @@
 eval { getgrgid 1 };   # OP_GGRGID
 eval { getpwnam 1 };   # OP_GPWNAM
 eval { getpwuid 1 };   # OP_GPWUID
+prototype "foo";       # OP_PROTOTYPE
 EXPECT
 ########
 # op.c
End of Patch.

Reply via email to