Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions amigaos4/amigaio.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,8 +632,8 @@ static void S_exec_failed(pTHX_ const char *cmd, int fd, int do_report)
if (e)
{
if (ckWARN(WARN_EXEC))
Perl_warner(aTHX_ packWARN(WARN_EXEC),
"Can't exec \"%s\": %s", cmd, Strerror(e));
warner(packWARN(WARN_EXEC),
"Can't exec \"%s\": %s", cmd, Strerror(e));
}
if (do_report)
{
Expand Down
4 changes: 2 additions & 2 deletions av.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Perl_av_reify(pTHX_ AV *av)
return;
#ifdef DEBUGGING
if (SvTIED_mg((const SV *)av, PERL_MAGIC_tied))
Perl_ck_warner_d(aTHX_ packWARN(WARN_DEBUGGING), "av_reify called on tied array");
ck_warner_d(packWARN(WARN_DEBUGGING), "av_reify called on tied array");
#endif
key = AvMAX(av) + 1;
while (key > AvFILLp(av) + 1)
Expand Down Expand Up @@ -641,7 +641,7 @@ Perl_av_clear(pTHX_ AV *av)

#ifdef DEBUGGING
if (SvREFCNT(av) == 0) {
Perl_ck_warner_d(aTHX_ packWARN(WARN_DEBUGGING), "Attempt to clear deleted array");
ck_warner_d(packWARN(WARN_DEBUGGING), "Attempt to clear deleted array");
}
#endif

Expand Down
12 changes: 6 additions & 6 deletions builtin.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ struct BuiltinFuncDescriptor {
static void S_warn_experimental_builtin(pTHX_ const char *name)
{
/* diag_listed_as: Built-in function '%s' is experimental */
Perl_ck_warner_d(aTHX_ packWARN(WARN_EXPERIMENTAL__BUILTIN),
"Built-in function 'builtin::%s' is experimental", name);
ck_warner_d(packWARN(WARN_EXPERIMENTAL__BUILTIN),
"Built-in function 'builtin::%s' is experimental", name);
}

/* These three utilities might want to live elsewhere to be reused from other
Expand Down Expand Up @@ -498,13 +498,13 @@ Perl_XS_builtin_indexed(pTHX_ CV *cv)

switch(GIMME_V) {
case G_VOID:
Perl_ck_warner(aTHX_ packWARN(WARN_VOID),
"Useless use of %s in void context", "builtin::indexed");
ck_warner(packWARN(WARN_VOID),
"Useless use of %s in void context", "builtin::indexed");
XSRETURN(0);

case G_SCALAR:
Perl_ck_warner(aTHX_ packWARN(WARN_SCALAR),
"Useless use of %s in scalar context", "builtin::indexed");
ck_warner(packWARN(WARN_SCALAR),
"Useless use of %s in scalar context", "builtin::indexed");
ST(0) = sv_2mortal(newSViv(items * 2));
XSRETURN(1);

Expand Down
3 changes: 1 addition & 2 deletions class.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ PP(pp_initfield)
STRLEN svcount = PL_stack_sp - svp + 1;

if(svcount % 2)
Perl_warner(aTHX_
packWARN(WARN_MISC), "Odd number of elements in hash field initialization");
warner(packWARN(WARN_MISC), "Odd number of elements in hash field initialization");

while(svp <= PL_stack_sp) {
SV *key = *svp; svp++;
Expand Down
4 changes: 2 additions & 2 deletions cygwin/cygwin.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ do_spawnvp (const char *path, const char * const *argv)
if (childpid < 0) {
status = -1;
if(ckWARN(WARN_EXEC))
Perl_warner(aTHX_ packWARN(WARN_EXEC),"Can't spawn \"%s\": %s",
path,Strerror (errno));
warner(packWARN(WARN_EXEC),"Can't spawn \"%s\": %s",
path, Strerror(errno));
} else {
do {
result = wait4pid(childpid, &status, 0);
Expand Down
113 changes: 55 additions & 58 deletions doio.c
Original file line number Diff line number Diff line change
Expand Up @@ -636,8 +636,7 @@ Perl_do_open6(pTHX_ GV *gv, const char *oname, STRLEN len,
#ifdef USE_STDIO
if (SvROK(*svp) && !memchr(oname, '&', len)) {
if (ckWARN(WARN_IO))
Perl_warner(aTHX_ packWARN(WARN_IO),
"Can't open a reference");
warner(packWARN(WARN_IO), "Can't open a reference");
SETERRNO(EINVAL, LIB_INVARG);
fp = NULL;
goto say_false;
Expand Down Expand Up @@ -685,7 +684,7 @@ Perl_do_open6(pTHX_ GV *gv, const char *oname, STRLEN len,
if (*name == '\0') {
/* command is missing 19990114 */
if (ckWARN(WARN_PIPE))
Perl_warner(aTHX_ packWARN(WARN_PIPE), "Missing command in piped open");
warner(packWARN(WARN_PIPE), "Missing command in piped open");
errno = EPIPE;
fp = NULL;
goto say_false;
Expand All @@ -696,7 +695,7 @@ Perl_do_open6(pTHX_ GV *gv, const char *oname, STRLEN len,
if (!num_svs && name[len-1] == '|') {
name[--len] = '\0' ;
if (ckWARN(WARN_PIPE))
Perl_warner(aTHX_ packWARN(WARN_PIPE), "Can't open bidirectional pipe");
warner(packWARN(WARN_PIPE), "Can't open bidirectional pipe");
}
mode[0] = 'w';
writing = 1;
Expand Down Expand Up @@ -919,7 +918,7 @@ Perl_do_open6(pTHX_ GV *gv, const char *oname, STRLEN len,
if (*name == '\0') {
/* command is missing 19990114 */
if (ckWARN(WARN_PIPE))
Perl_warner(aTHX_ packWARN(WARN_PIPE), "Missing command in piped open");
warner(packWARN(WARN_PIPE), "Missing command in piped open");
errno = EPIPE;
fp = NULL;
goto say_false;
Expand Down Expand Up @@ -1004,7 +1003,7 @@ S_openn_cleanup(pTHX_ GV *gv, IO *io, PerlIO *fp, char *mode, const char *oname,
)
{
GCC_DIAG_IGNORE_STMT(-Wformat-nonliteral); /* PL_warn_nl is constant */
Perl_warner(aTHX_ packWARN(WARN_NEWLINE), PL_warn_nl, "open");
warner(packWARN(WARN_NEWLINE), PL_warn_nl, "open");
GCC_DIAG_RESTORE_STMT;
}
goto say_false;
Expand All @@ -1013,17 +1012,16 @@ S_openn_cleanup(pTHX_ GV *gv, IO *io, PerlIO *fp, char *mode, const char *oname,
if (ckWARN(WARN_IO)) {
if ((IoTYPE(io) == IoTYPE_RDONLY) &&
(fp == PerlIO_stdout() || fp == PerlIO_stderr())) {
Perl_warner(aTHX_ packWARN(WARN_IO),
"Filehandle STD%s reopened as %" HEKf
" only for input",
((fp == PerlIO_stdout()) ? "OUT" : "ERR"),
HEKfARG(GvENAME_HEK(gv)));
warner(packWARN(WARN_IO),
"Filehandle STD%s reopened as %" HEKf
" only for input",
((fp == PerlIO_stdout()) ? "OUT" : "ERR"),
HEKfARG(GvENAME_HEK(gv)));
}
else if ((IoTYPE(io) == IoTYPE_WRONLY) && fp == PerlIO_stdin()) {
Perl_warner(aTHX_ packWARN(WARN_IO),
"Filehandle STDIN reopened as %" HEKf " only for output",
HEKfARG(GvENAME_HEK(gv))
);
warner(packWARN(WARN_IO),
"Filehandle STDIN reopened as %" HEKf " only for output",
HEKfARG(GvENAME_HEK(gv)));
}
}

Expand Down Expand Up @@ -1440,9 +1438,9 @@ Perl_nextargv(pTHX_ GV *gv, bool nomagicopen)
}
else {
if (is_fork_open(PL_oldname)) {
Perl_ck_warner_d(aTHX_ packWARN(WARN_INPLACE),
"Forked open '%s' not meaningful in <>",
PL_oldname);
ck_warner_d(packWARN(WARN_INPLACE),
"Forked open '%s' not meaningful in <>",
PL_oldname);
continue;
}

Expand Down Expand Up @@ -1485,9 +1483,9 @@ Perl_nextargv(pTHX_ GV *gv, bool nomagicopen)
fileuid = statbuf.st_uid;
filegid = statbuf.st_gid;
if (!S_ISREG(PL_filemode)) {
Perl_ck_warner_d(aTHX_ packWARN(WARN_INPLACE),
"Can't do inplace edit: %s is not a regular file",
PL_oldname );
ck_warner_d(packWARN(WARN_INPLACE),
"Can't do inplace edit: %s is not a regular file",
PL_oldname );
do_close(gv,FALSE);
continue;
}
Expand All @@ -1514,10 +1512,10 @@ Perl_nextargv(pTHX_ GV *gv, bool nomagicopen)
&& statbuf.st_ino == fileino)
)
{
Perl_ck_warner_d(aTHX_ packWARN(WARN_INPLACE),
"Can't do inplace edit: %"
SVf " would not be unique",
SVfARG(sv));
ck_warner_d(packWARN(WARN_INPLACE),
"Can't do inplace edit: %"
SVf " would not be unique",
SVfARG(sv));
goto cleanup_argv;
}
#endif
Expand All @@ -1530,8 +1528,8 @@ Perl_nextargv(pTHX_ GV *gv, bool nomagicopen)
if (!S_openindirtemp(aTHX_ PL_argvoutgv, GvSV(gv), temp_name_sv)) {
SvREFCNT_dec(temp_name_sv);
/* diag_listed_as: Can't do inplace edit on %s: %s */
Perl_ck_warner_d(aTHX_ packWARN(WARN_INPLACE), "Can't do inplace edit on %s: Cannot make temp name: %s",
PL_oldname, Strerror(errno) );
ck_warner_d(packWARN(WARN_INPLACE), "Can't do inplace edit on %s: Cannot make temp name: %s",
PL_oldname, Strerror(errno) );
#ifndef FLEXFILENAMES
cleanup_argv:
#endif
Expand Down Expand Up @@ -1583,13 +1581,13 @@ Perl_nextargv(pTHX_ GV *gv, bool nomagicopen)
Stat_t statbuf;
if (PerlLIO_stat(PL_oldname, &statbuf) >= 0
&& !S_ISREG(statbuf.st_mode)) {
Perl_warner(aTHX_ packWARN(WARN_INPLACE),
"Can't do inplace edit: %s is not a regular file",
PL_oldname);
warner(packWARN(WARN_INPLACE),
"Can't do inplace edit: %s is not a regular file",
PL_oldname);
}
else {
Perl_warner(aTHX_ packWARN(WARN_INPLACE), "Can't open %s: %s",
PL_oldname, Strerror(eno));
warner(packWARN(WARN_INPLACE), "Can't open %s: %s",
PL_oldname, Strerror(eno));
}
}
}
Expand Down Expand Up @@ -1964,16 +1962,16 @@ Perl_io_close(pTHX_ IO *io, GV *gv, bool is_explict, bool warn_on_fail)

if (warn_on_fail && !retval) {
if (gv)
Perl_ck_warner_d(aTHX_ packWARN(WARN_IO),
"Warning: unable to close filehandle %"
HEKf " properly: %" SVf,
HEKfARG(GvNAME_HEK(gv)),
SVfARG(get_sv("!",GV_ADD)));
ck_warner_d(packWARN(WARN_IO),
"Warning: unable to close filehandle %"
HEKf " properly: %" SVf,
HEKfARG(GvNAME_HEK(gv)),
SVfARG(get_sv("!",GV_ADD)));
else
Perl_ck_warner_d(aTHX_ packWARN(WARN_IO),
"Warning: unable to close filehandle "
"properly: %" SVf,
SVfARG(get_sv("!",GV_ADD)));
ck_warner_d(packWARN(WARN_IO),
"Warning: unable to close filehandle "
"properly: %" SVf,
SVfARG(get_sv("!",GV_ADD)));
}
}
else if (is_explict) {
Expand Down Expand Up @@ -2249,10 +2247,9 @@ Perl_do_print(pTHX_ SV *sv, PerlIO *fp)
if (! utf8_to_bytes_new_pv(&tmps, &len, &free_me)) {
/* Non-utf8 output stream, but string only representable in
utf8 */
Perl_ck_warner_d(aTHX_ packWARN(WARN_UTF8),
"Wide character in %s",
PL_op ? OP_DESC(PL_op) : "print"
);
ck_warner_d(packWARN(WARN_UTF8),
"Wide character in %s",
PL_op ? OP_DESC(PL_op) : "print");
/* Could also check that isn't one of the things to avoid
* in utf8 by using check_utf8_print(), but not doing so,
* since the stream isn't a UTF8 stream */
Expand Down Expand Up @@ -2337,7 +2334,7 @@ Perl_my_stat_flags(pTHX_ const U32 flags)
}
if (PL_laststatval < 0 && ckWARN(WARN_NEWLINE) && should_warn_nl(s)) {
GCC_DIAG_IGNORE_STMT(-Wformat-nonliteral); /* PL_warn_nl is constant */
Perl_warner(aTHX_ packWARN(WARN_NEWLINE), PL_warn_nl, "stat");
warner(packWARN(WARN_NEWLINE), PL_warn_nl, "stat");
GCC_DIAG_RESTORE_STMT;
}
return PL_laststatval;
Expand All @@ -2364,9 +2361,9 @@ Perl_my_lstat_flags(pTHX_ const U32 flags)
PL_laststatval = -1;
if (ckWARN(WARN_IO)) {
/* diag_listed_as: Use of -l on filehandle%s */
Perl_warner(aTHX_ packWARN(WARN_IO),
"Use of -l on filehandle %" HEKf,
HEKfARG(GvENAME_HEK(cGVOP_gv)));
warner(packWARN(WARN_IO),
"Use of -l on filehandle %" HEKf,
HEKfARG(GvENAME_HEK(cGVOP_gv)));
}
SETERRNO(EBADF,RMS_IFI);
return -1;
Expand All @@ -2388,14 +2385,14 @@ Perl_my_lstat_flags(pTHX_ const U32 flags)
&& ckWARN(WARN_IO)) {
if (isio)
/* diag_listed_as: Use of -l on filehandle%s */
Perl_warner(aTHX_ packWARN(WARN_IO),
"Use of -l on filehandle");
warner(packWARN(WARN_IO),
"Use of -l on filehandle");
else
/* diag_listed_as: Use of -l on filehandle%s */
Perl_warner(aTHX_ packWARN(WARN_IO),
"Use of -l on filehandle %" HEKf,
HEKfARG(GvENAME_HEK((const GV *)
(SvROK(sv) ? SvRV(sv) : sv))));
warner(packWARN(WARN_IO),
"Use of -l on filehandle %" HEKf,
HEKfARG(GvENAME_HEK((const GV *)
(SvROK(sv) ? SvRV(sv) : sv))));
}
file = SvPV_flags_const(sv, len, flags);
sv_setpv(PL_statname,file);
Expand All @@ -2407,7 +2404,7 @@ Perl_my_lstat_flags(pTHX_ const U32 flags)
}
if (PL_laststatval < 0 && ckWARN(WARN_NEWLINE) && should_warn_nl(file)) {
GCC_DIAG_IGNORE_STMT(-Wformat-nonliteral); /* PL_warn_nl is constant */
Perl_warner(aTHX_ packWARN(WARN_NEWLINE), PL_warn_nl, "lstat");
warner(packWARN(WARN_NEWLINE), PL_warn_nl, "lstat");
GCC_DIAG_RESTORE_STMT;
}
return PL_laststatval;
Expand All @@ -2420,7 +2417,7 @@ S_exec_failed(pTHX_ const char *cmd, int fd, int do_report)
PERL_ARGS_ASSERT_EXEC_FAILED;

if (ckWARN(WARN_EXEC))
Perl_warner(aTHX_ packWARN(WARN_EXEC), "Can't exec \"%s\": %s",
warner(packWARN(WARN_EXEC), "Can't exec \"%s\": %s",
cmd, Strerror(e));
if (do_report) {
/* XXX silently ignore failures */
Expand Down Expand Up @@ -3523,7 +3520,7 @@ Perl_vms_start_glob
LEAVE;

if (!fp && ckWARN(WARN_GLOB)) {
Perl_warner(aTHX_ packWARN(WARN_GLOB), "glob failed (can't start child: %s)",
warner(packWARN(WARN_GLOB), "glob failed (can't start child: %s)",
Strerror(errno));
}

Expand Down
8 changes: 4 additions & 4 deletions doop.c
Original file line number Diff line number Diff line change
Expand Up @@ -833,8 +833,8 @@ Perl_do_vecget(pTHX_ SV *sv, STRLEN offset, int size)
#ifdef UV_IS_QUAD

if (size == 64) {
Perl_ck_warner(aTHX_ packWARN(WARN_PORTABLE),
"Bit vector size > 32 non-portable");
ck_warner(packWARN(WARN_PORTABLE),
"Bit vector size > 32 non-portable");
}
#endif
if (offset > Size_t_MAX / n - 1) /* would overflow */
Expand Down Expand Up @@ -961,8 +961,8 @@ Perl_do_vecset(pTHX_ SV *sv)
#ifdef UV_IS_QUAD

case 64:
Perl_ck_warner(aTHX_ packWARN(WARN_PORTABLE),
"Bit vector size > 32 non-portable");
ck_warner(packWARN(WARN_PORTABLE),
"Bit vector size > 32 non-portable");
s[offset+7] = (U8)( lval ); /* = size - 64 */
s[offset+6] = (U8)( lval >> 8); /* = size - 56 */
s[offset+5] = (U8)( lval >> 16); /* = size - 48 */
Expand Down
8 changes: 4 additions & 4 deletions dquote.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Perl_grok_bslash_c(pTHX_ const char source,
*packed_warn = packWARN(WARN_SYNTAX);
}
else {
Perl_warner(aTHX_ packWARN(WARN_SYNTAX), format, source, clearer);
warner(packWARN(WARN_SYNTAX), format, source, clearer);
}
}

Expand Down Expand Up @@ -360,7 +360,7 @@ Perl_grok_bslash_o(pTHX_ char **s, const char * const send, UV *uv,
*packed_warn = packWARN(WARN_DIGIT);
}
else {
Perl_warner(aTHX_ packWARN(WARN_DIGIT), "%s", failure);
warner(packWARN(WARN_DIGIT), "%s", failure);
}
}
}
Expand Down Expand Up @@ -467,7 +467,7 @@ Perl_grok_bslash_x(pTHX_ char ** s, const char * const send, UV *uv,
send, UTF, FALSE);

if (! packed_warn) {
Perl_warner(aTHX_ packWARN(WARN_DIGIT), "%s", failure);
warner(packWARN(WARN_DIGIT), "%s", failure);
}
else {
*message = failure;
Expand Down Expand Up @@ -546,7 +546,7 @@ Perl_grok_bslash_x(pTHX_ char ** s, const char * const send, UV *uv,
const char * failure = form_alien_digit_msg(16, numbers_len, *s,
send, UTF, TRUE);
if (! packed_warn) {
Perl_warner(aTHX_ packWARN(WARN_DIGIT), "%s", failure);
warner(packWARN(WARN_DIGIT), "%s", failure);
}
else {
*message = failure;
Expand Down
2 changes: 1 addition & 1 deletion dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -2964,7 +2964,7 @@ Perl_runops_debug(pTHX)
#endif

if (!PL_op) {
Perl_ck_warner_d(aTHX_ packWARN(WARN_DEBUGGING), "NULL OP IN RUN");
ck_warner_d(packWARN(WARN_DEBUGGING), "NULL OP IN RUN");
return 0;
}
DEBUG_l(Perl_deb(aTHX_ "Entering new RUNOPS level\n"));
Expand Down
Loading
Loading