summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Peters <steve@fisharerojo.org>2008-03-08 15:13:26 +0000
committerSteve Peters <steve@fisharerojo.org>2008-03-08 15:13:26 +0000
commit52a5bfab8876f302d269f1bfa46eae1998f0d3ca (patch)
tree6ca4d6d9e9d07878930be0ac25b02b30b2ac83fd
parent2fed2a1ba94aec1ffaf141357a7d90754b2b3208 (diff)
downloadperl-52a5bfab8876f302d269f1bfa46eae1998f0d3ca.tar.gz
Perl_croak_nocontext() is called with NULL indirectly from
some XS-based modules. p4raw-id: //depot/perl@33453
-rw-r--r--embed.fnc2
-rw-r--r--proto.h5
-rw-r--r--util.c1
3 files changed, 2 insertions, 6 deletions
diff --git a/embed.fnc b/embed.fnc
index 3f361c5e57..88e3db27e1 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -149,7 +149,7 @@ pM |PERL_CONTEXT* |create_eval_scope|U32 flags
Afprd |void |croak |NULLOK const char* pat|...
Apr |void |vcroak |NULLOK const char* pat|NULLOK va_list* args
#if defined(PERL_IMPLICIT_CONTEXT)
-Afnrp |void |croak_nocontext|NN const char* pat|...
+Afnrp |void |croak_nocontext|NULLOK const char* pat|...
Afnp |OP* |die_nocontext |NN const char* pat|...
Afnp |void |deb_nocontext |NN const char* pat|...
Afnp |char* |form_nocontext |NN const char* pat|...
diff --git a/proto.h b/proto.h
index c334b00ec6..ef46817fea 100644
--- a/proto.h
+++ b/proto.h
@@ -330,10 +330,7 @@ PERL_CALLCONV void Perl_vcroak(pTHX_ const char* pat, va_list* args)
#if defined(PERL_IMPLICIT_CONTEXT)
PERL_CALLCONV void Perl_croak_nocontext(const char* pat, ...)
__attribute__noreturn__
- __attribute__format__(__printf__,1,2)
- __attribute__nonnull__(1);
-#define PERL_ARGS_ASSERT_CROAK_NOCONTEXT \
- assert(pat)
+ __attribute__format__null_ok__(__printf__,1,2);
PERL_CALLCONV OP* Perl_die_nocontext(const char* pat, ...)
__attribute__format__(__printf__,1,2)
diff --git a/util.c b/util.c
index 82f147ef22..a6b5c1c226 100644
--- a/util.c
+++ b/util.c
@@ -1432,7 +1432,6 @@ Perl_croak_nocontext(const char *pat, ...)
{
dTHX;
va_list args;
- PERL_ARGS_ASSERT_CROAK_NOCONTEXT;
va_start(args, pat);
vcroak(pat, &args);
/* NOTREACHED */