From 8406bfe4652b96bc997b2852690fad6203654c2b Mon Sep 17 00:00:00 2001 From: Arne Redlich Date: Tue, 18 Feb 2014 00:41:05 +0100 Subject: [PATCH] {nfs,rpc}_set_error: add __attribute__((format(printf))) annotations Signed-off-by: Arne Redlich --- include/libnfs-private.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/include/libnfs-private.h b/include/libnfs-private.h index b22d9b6..07ce9a8 100644 --- a/include/libnfs-private.h +++ b/include/libnfs-private.h @@ -133,8 +133,17 @@ int rpc_get_pdu_size(char *buf); int rpc_process_pdu(struct rpc_context *rpc, char *buf, int size); void rpc_error_all_pdus(struct rpc_context *rpc, char *error); -void rpc_set_error(struct rpc_context *rpc, char *error_string, ...); -void nfs_set_error(struct nfs_context *nfs, char *error_string, ...); +void rpc_set_error(struct rpc_context *rpc, char *error_string, ...) +#ifdef __GNUC__ + __attribute__((format(printf, 2, 3))) +#endif +; + +void nfs_set_error(struct nfs_context *nfs, char *error_string, ...) +#ifdef __GNUC__ + __attribute__((format(printf, 2, 3))) +#endif +; const char *nfs_get_server(struct nfs_context *nfs); const char *nfs_get_export(struct nfs_context *nfs); -- 2.34.1