-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This patch looks good to me. acked. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk9x2AIACgkQrlYvE4MpobMrZwCfbNkO4+xLK3fHXh0moYqU83bE m8YAn1o9x4LQ5VfI89ipV6dE+pMVdjT3 =NoQZ -----END PGP SIGNATURE-----
>From d9a15934f5e7ce19c95652c1a724942210af1da8 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" <berrange@xxxxxxxxxx> Date: Mon, 23 Jan 2012 15:41:17 +0000 Subject: [PATCH 24/73] libselinux: Add more printf format annotations The public avc.h file must use a printf annotation in the struct callback members, otherwise application code will get compiler warnings that the method should have an annotation set. Signed-off-by: Eric Paris <eparis@xxxxxxxxxx> --- libselinux/include/selinux/avc.h | 2 +- libselinux/src/avc_internal.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libselinux/include/selinux/avc.h b/libselinux/include/selinux/avc.h index da18e41..9655957 100644 --- a/libselinux/include/selinux/avc.h +++ b/libselinux/include/selinux/avc.h @@ -130,7 +130,7 @@ struct avc_memory_callback { struct avc_log_callback { /* log the printf-style format and arguments. */ - void (*func_log) (const char *fmt, ...); + void (*func_log) (const char *fmt, ...) __attribute__((__format__(printf, 1, 2))); /* store a string representation of auditdata (corresponding to the given security class) into msgbuf. */ void (*func_audit) (void *auditdata, security_class_t cls, diff --git a/libselinux/src/avc_internal.h b/libselinux/src/avc_internal.h index 53610e8..f851659 100644 --- a/libselinux/src/avc_internal.h +++ b/libselinux/src/avc_internal.h @@ -20,7 +20,7 @@ extern void *(*avc_func_malloc) (size_t) hidden; extern void (*avc_func_free) (void *)hidden; -extern void (*avc_func_log) (const char *, ...)hidden; +extern void (*avc_func_log) (const char *, ...) __attribute__((__format__(printf,1,2))) hidden; extern void (*avc_func_audit) (void *, security_class_t, char *, size_t)hidden; extern int avc_using_threads hidden; -- 1.7.9.3