From: Tom Yu Date: Mon, 25 May 2009 05:43:55 +0000 (+0000) Subject: use printf format attribute only with gcc X-Git-Tag: krb5-1.7-beta3~7 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=d3d3521be66620ce3b1448e4677e33fd0c6cf8a8;p=krb5.git use printf format attribute only with gcc pull up r22363 from trunk ------------------------------------------------------------------------ r22363 | raeburn | 2009-05-22 19:19:37 +0200 (Fri, 22 May 2009) | 2 lines Use printf format attribute only with gcc. ticket: 6499 target_version: 1.7 tags: pullup version_fixed: 1.7 status: resolved git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-7@22379 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, ...)