Use __attribute__ ((__name__)) form
Protect against macros named noreturn and so on.
This commit is contained in:

committed by
Viktor Dukhovni

parent
31896397d7
commit
6a0f45c4d7
@@ -36,7 +36,7 @@
|
||||
|
||||
static krb5_error_code _warnerr(krb5_context context, int do_errtext,
|
||||
krb5_error_code code, int level, const char *fmt, va_list ap)
|
||||
__attribute__((__format__(__printf__, 5, 0)));
|
||||
__attribute__ ((__format__ (__printf__, 5, 0)));
|
||||
|
||||
static krb5_error_code
|
||||
_warnerr(krb5_context context, int do_errtext,
|
||||
@@ -110,7 +110,7 @@ _warnerr(krb5_context context, int do_errtext,
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_vwarn(krb5_context context, krb5_error_code code,
|
||||
const char *fmt, va_list ap)
|
||||
__attribute__ ((format (printf, 3, 0)))
|
||||
__attribute__ ((__format__ (__printf__, 3, 0)))
|
||||
{
|
||||
return _warnerr(context, 1, code, 1, fmt, ap);
|
||||
}
|
||||
@@ -128,7 +128,7 @@ krb5_vwarn(krb5_context context, krb5_error_code code,
|
||||
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_warn(krb5_context context, krb5_error_code code, const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 3, 4)))
|
||||
__attribute__ ((__format__ (__printf__, 3, 4)))
|
||||
{
|
||||
FUNC(1, code, 1);
|
||||
return ret;
|
||||
@@ -146,7 +146,7 @@ krb5_warn(krb5_context context, krb5_error_code code, const char *fmt, ...)
|
||||
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_vwarnx(krb5_context context, const char *fmt, va_list ap)
|
||||
__attribute__ ((format (printf, 2, 0)))
|
||||
__attribute__ ((__format__ (__printf__, 2, 0)))
|
||||
{
|
||||
return _warnerr(context, 0, 0, 1, fmt, ap);
|
||||
}
|
||||
@@ -162,7 +162,7 @@ krb5_vwarnx(krb5_context context, const char *fmt, va_list ap)
|
||||
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_warnx(krb5_context context, const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 2, 3)))
|
||||
__attribute__ ((__format__ (__printf__, 2, 3)))
|
||||
{
|
||||
FUNC(0, 0, 1);
|
||||
return ret;
|
||||
@@ -184,7 +184,7 @@ krb5_warnx(krb5_context context, const char *fmt, ...)
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_verr(krb5_context context, int eval, krb5_error_code code,
|
||||
const char *fmt, va_list ap)
|
||||
__attribute__ ((noreturn, format (printf, 4, 0)))
|
||||
__attribute__ ((__noreturn__, __format__ (__printf__, 4, 0)))
|
||||
{
|
||||
_warnerr(context, 1, code, 0, fmt, ap);
|
||||
exit(eval);
|
||||
@@ -206,7 +206,7 @@ krb5_verr(krb5_context context, int eval, krb5_error_code code,
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_err(krb5_context context, int eval, krb5_error_code code,
|
||||
const char *fmt, ...)
|
||||
__attribute__ ((noreturn, format (printf, 4, 5)))
|
||||
__attribute__ ((__noreturn__, __format__ (__printf__, 4, 5)))
|
||||
{
|
||||
FUNC_NORET(1, code, 0);
|
||||
exit(eval);
|
||||
@@ -226,7 +226,7 @@ krb5_err(krb5_context context, int eval, krb5_error_code code,
|
||||
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_verrx(krb5_context context, int eval, const char *fmt, va_list ap)
|
||||
__attribute__ ((noreturn, format (printf, 3, 0)))
|
||||
__attribute__ ((__noreturn__, __format__ (__printf__, 3, 0)))
|
||||
{
|
||||
_warnerr(context, 0, 0, 0, fmt, ap);
|
||||
exit(eval);
|
||||
@@ -245,7 +245,7 @@ krb5_verrx(krb5_context context, int eval, const char *fmt, va_list ap)
|
||||
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_errx(krb5_context context, int eval, const char *fmt, ...)
|
||||
__attribute__ ((noreturn, format (printf, 3, 4)))
|
||||
__attribute__ ((__noreturn__, __format__ (__printf__, 3, 4)))
|
||||
{
|
||||
FUNC_NORET(0, 0, 0);
|
||||
exit(eval);
|
||||
@@ -267,7 +267,7 @@ krb5_errx(krb5_context context, int eval, const char *fmt, ...)
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_vabort(krb5_context context, krb5_error_code code,
|
||||
const char *fmt, va_list ap)
|
||||
__attribute__ ((noreturn, format (printf, 3, 0)))
|
||||
__attribute__ ((__noreturn__, __format__ (__printf__, 3, 0)))
|
||||
{
|
||||
_warnerr(context, 1, code, 0, fmt, ap);
|
||||
abort();
|
||||
@@ -288,7 +288,7 @@ krb5_vabort(krb5_context context, krb5_error_code code,
|
||||
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_abort(krb5_context context, krb5_error_code code, const char *fmt, ...)
|
||||
__attribute__ ((noreturn, format (printf, 3, 4)))
|
||||
__attribute__ ((__noreturn__, __format__ (__printf__, 3, 4)))
|
||||
{
|
||||
FUNC_NORET(1, code, 0);
|
||||
abort();
|
||||
@@ -297,7 +297,7 @@ krb5_abort(krb5_context context, krb5_error_code code, const char *fmt, ...)
|
||||
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_vabortx(krb5_context context, const char *fmt, va_list ap)
|
||||
__attribute__ ((noreturn, format (printf, 2, 0)))
|
||||
__attribute__ ((__noreturn__, __format__ (__printf__, 2, 0)))
|
||||
{
|
||||
_warnerr(context, 0, 0, 0, fmt, ap);
|
||||
abort();
|
||||
@@ -316,7 +316,7 @@ krb5_vabortx(krb5_context context, const char *fmt, va_list ap)
|
||||
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_abortx(krb5_context context, const char *fmt, ...)
|
||||
__attribute__ ((noreturn, format (printf, 2, 3)))
|
||||
__attribute__ ((__noreturn__, __format__ (__printf__, 2, 3)))
|
||||
{
|
||||
FUNC_NORET(0, 0, 0);
|
||||
abort();
|
||||
|
Reference in New Issue
Block a user