This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
io/sem.t: eliminate warnings
This eliminates some warnings that semctl() (or other *ctl()) calls
might generate, and some warnings specific to io/sem.t:
- for IPC_STAT and GETALL, the current value of ARG is overwritten
so making an undefined value warning for it nonsensical, so don't
use SvPV_force().
- for other calls, ARG is either ignored, or in a behaviour
introduced in perl 3 (along with the ops), treats the supplied
value as an integer which is then converted to a pointer. Rather
than warning on an undef value which is most likely to be ignored
we treat the undef as zero without the usual warning.
- always pass a number for SEMNUM in the test code
I didn't try to eliminate warning for non-numeric/undefined SEMNUM,
since while we know it isn't used by SETALL, GETALL, IPC_STAT and
IPC_SET, it may or may not be used by system defined *ctl() operators
such as SEM_INFO and SHM_LOCK on Linux.
fixes #17926