From: Ken Raeburn Date: Fri, 22 May 2009 17:19:37 +0000 (+0000) Subject: Use printf format attribute only with gcc X-Git-Tag: krb5-1.8-alpha1~463 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1ca60810170721fc9a8f8c4e4e1f9ec651db7af6;p=krb5.git Use printf format attribute only with gcc git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22363 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/krb/t_pac.c b/src/lib/krb5/krb/t_pac.c index 9e0ee7d4d..527e3db22 100644 --- a/src/lib/krb5/krb/t_pac.c +++ b/src/lib/krb5/krb/t_pac.c @@ -96,8 +96,10 @@ static const krb5_keyblock member_keyblock = { static time_t authtime = 1120440609; static const char *user = "w2003final$@WIN2K3.THINKER.LOCAL"; +#if !defined(__cplusplus) && (__GNUC__ > 2) static void err(krb5_context ctx, krb5_error_code code, const char *fmt, ...) __attribute__((__format__(__printf__, 3, 0))); +#endif static void err(krb5_context ctx, krb5_error_code code, const char *fmt, ...) diff --git a/src/lib/krb5/krb/t_princ.c b/src/lib/krb5/krb/t_princ.c index e6db1f57d..688331722 100644 --- a/src/lib/krb5/krb/t_princ.c +++ b/src/lib/krb5/krb/t_princ.c @@ -38,8 +38,10 @@ * there when it's destroyed. */ +#if !defined(__cplusplus) && (__GNUC__ > 2) static void err(krb5_context ctx, krb5_error_code code, const char *fmt, ...) __attribute__((__format__(__printf__, 3, 0))); +#endif static void err(krb5_context ctx, krb5_error_code code, const char *fmt, ...)