From: Arne Redlich Date: Mon, 17 Feb 2014 23:41:05 +0000 (+0100) Subject: {nfs,rpc}_set_error: add __attribute__((format(printf))) annotations X-Git-Tag: upstream/1.9.6^2~89 X-Git-Url: https://git.piment-noir.org/?p=deb_libnfs.git;a=commitdiff_plain;h=8406bfe4652b96bc997b2852690fad6203654c2b {nfs,rpc}_set_error: add __attribute__((format(printf))) annotations Signed-off-by: Arne Redlich --- 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);