diff options
author | David Mitchell <davem@iabyn.com> | 2013-11-26 15:50:45 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2013-11-28 17:03:49 +0000 |
commit | 531b2663d70bdda47662024f4697a3c3f713f83c (patch) | |
tree | c51deedbb0bb319397306d8c129bf1f3d57b8834 /proto.h | |
parent | 1061065f7a09399eefb50e9a035502621722bcc0 (diff) | |
download | perl-531b2663d70bdda47662024f4697a3c3f713f83c.tar.gz |
mark Perl_my_strftime with format attribute
mark this function with
__attribute__format__null_ok__(__strftime__,pTHX_1,0)
so that compiler checks and warnings about strftime-style format args
can be checked.
Rather than adding new flag(s) to embed.fnc, I just enhanced the f flag
to treat it as strftime-style rather than printf if the function name
matches /strftime/. This was quicker, and we're unlikely to have many
such functions.
Diffstat (limited to 'proto.h')
-rw-r--r-- | proto.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -2681,6 +2681,7 @@ PERL_CALLCONV int Perl_my_socketpair(int family, int type, int protocol, int fd[ /* PERL_CALLCONV I32 Perl_my_stat(pTHX); */ PERL_CALLCONV I32 Perl_my_stat_flags(pTHX_ const U32 flags); PERL_CALLCONV char * Perl_my_strftime(pTHX_ const char *fmt, int sec, int min, int hour, int mday, int mon, int year, int wday, int yday, int isdst) + __attribute__format__null_ok__(__strftime__,pTHX_1,0) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_MY_STRFTIME \ assert(fmt) |