Use __attribute__ ((__name__)) form

Protect against macros named noreturn and so on.
This commit is contained in:
Nicolas Williams
2017-01-31 10:50:54 -06:00
committed by Viktor Dukhovni
parent 31896397d7
commit 6a0f45c4d7
21 changed files with 73 additions and 73 deletions

View File

@@ -40,7 +40,7 @@
static void
str2data (krb5_data *d,
const char *fmt,
...) __attribute__ ((format (printf, 2, 3)));
...) __attribute__ ((__format__ (__printf__, 2, 3)));
static void
str2data (krb5_data *d,

View File

@@ -470,7 +470,7 @@ krb5_free_error_string(krb5_context context, char *str)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_set_error_string(krb5_context context, const char *fmt, ...)
__attribute__((format (printf, 2, 3)))
__attribute__ ((__format__ (__printf__, 2, 3)))
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
va_list ap;
@@ -498,7 +498,7 @@ krb5_set_error_string(krb5_context context, const char *fmt, ...)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_vset_error_string(krb5_context context, const char *fmt, va_list args)
__attribute__ ((format (printf, 2, 0)))
__attribute__ ((__format__ (__printf__, 2, 0)))
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
krb5_vset_error_message(context, 0, fmt, args);

View File

@@ -72,7 +72,7 @@ krb5_clear_error_message(krb5_context context)
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
krb5_set_error_message(krb5_context context, krb5_error_code ret,
const char *fmt, ...)
__attribute__ ((format (printf, 3, 4)))
__attribute__ ((__format__ (__printf__, 3, 4)))
{
va_list ap;
@@ -98,7 +98,7 @@ krb5_set_error_message(krb5_context context, krb5_error_code ret,
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
krb5_vset_error_message (krb5_context context, krb5_error_code ret,
const char *fmt, va_list args)
__attribute__ ((format (printf, 3, 0)))
__attribute__ ((__format__ (__printf__, 3, 0)))
{
int r;
@@ -136,7 +136,7 @@ krb5_vset_error_message (krb5_context context, krb5_error_code ret,
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
krb5_prepend_error_message(krb5_context context, krb5_error_code ret,
const char *fmt, ...)
__attribute__ ((format (printf, 3, 4)))
__attribute__ ((__format__ (__printf__, 3, 4)))
{
va_list ap;
@@ -161,7 +161,7 @@ krb5_prepend_error_message(krb5_context context, krb5_error_code ret,
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
krb5_vprepend_error_message(krb5_context context, krb5_error_code ret,
const char *fmt, va_list args)
__attribute__ ((format (printf, 3, 0)))
__attribute__ ((__format__ (__printf__, 3, 0)))
{
char *str = NULL, *str2 = NULL;

View File

@@ -411,7 +411,7 @@ krb5_vlog_msg(krb5_context context,
int level,
const char *fmt,
va_list ap)
__attribute__((format (printf, 5, 0)))
__attribute__ ((__format__ (__printf__, 5, 0)))
{
char *msg = NULL;
@@ -449,7 +449,7 @@ krb5_vlog(krb5_context context,
int level,
const char *fmt,
va_list ap)
__attribute__((format (printf, 4, 0)))
__attribute__ ((__format__ (__printf__, 4, 0)))
{
return krb5_vlog_msg(context, fac, NULL, level, fmt, ap);
}
@@ -461,7 +461,7 @@ krb5_log_msg(krb5_context context,
char **reply,
const char *fmt,
...)
__attribute__((format (printf, 5, 6)))
__attribute__ ((__format__ (__printf__, 5, 6)))
{
va_list ap;
krb5_error_code ret;
@@ -479,7 +479,7 @@ krb5_log(krb5_context context,
int level,
const char *fmt,
...)
__attribute__((format (printf, 4, 5)))
__attribute__ ((__format__ (__printf__, 4, 5)))
{
va_list ap;
krb5_error_code ret;
@@ -495,7 +495,7 @@ _krb5_debug(krb5_context context,
int level,
const char *fmt,
...)
__attribute__((format (printf, 3, 4)))
__attribute__ ((__format__ (__printf__, 3, 4)))
{
va_list ap;

View File

@@ -64,7 +64,7 @@ pk_copy_error(krb5_context context,
int hxret,
const char *fmt,
...)
__attribute__ ((format (printf, 4, 5)));
__attribute__ ((__format__ (__printf__, 4, 5)));
/*
*

View File

@@ -308,7 +308,7 @@ struct host {
static void
debug_host(krb5_context context, int level, struct host *host, const char *fmt, ...)
__attribute__((__format__(__printf__, 4, 5)));
__attribute__ ((__format__ (__printf__, 4, 5)));
static void
debug_host(krb5_context context, int level, struct host *host, const char *fmt, ...)

View File

@@ -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();