summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2009-05-22 17:19:37 +0000
committerKen Raeburn <raeburn@mit.edu>2009-05-22 17:19:37 +0000
commit1ca60810170721fc9a8f8c4e4e1f9ec651db7af6 (patch)
treea4bb5f307353a98ac00fea7b95699ac85f7e2a11 /src
parentb7d77ee55b4b00ac6e5edbb2c0b63ec3ed208a79 (diff)
downloadkrb5-1ca60810170721fc9a8f8c4e4e1f9ec651db7af6.tar.gz
krb5-1ca60810170721fc9a8f8c4e4e1f9ec651db7af6.tar.xz
krb5-1ca60810170721fc9a8f8c4e4e1f9ec651db7af6.zip
Use printf format attribute only with gcc
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22363 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/lib/krb5/krb/t_pac.c2
-rw-r--r--src/lib/krb5/krb/t_princ.c2
2 files changed, 4 insertions, 0 deletions
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, ...)