From ed6deba2b8a496e5c3047d3d46208109ac762e4b Mon Sep 17 00:00:00 2001 From: John Levon Date: Wed, 7 Apr 2021 09:45:55 +0100 Subject: mark vfu_log() with format attribute (#426) Fix up all resulting fallout. Signed-off-by: John Levon Reviewed-by: Thanos Makatos --- include/libvfio-user.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/libvfio-user.h b/include/libvfio-user.h index 97618a8..90dd21a 100644 --- a/include/libvfio-user.h +++ b/include/libvfio-user.h @@ -184,7 +184,8 @@ typedef void (vfu_log_fn_t)(vfu_ctx_t *vfu_ctx, int level, const char *msg); * Log to the logging function configured for this context. */ void -vfu_log(vfu_ctx_t *vfu_ctx, int level, const char *fmt, ...); +vfu_log(vfu_ctx_t *vfu_ctx, int level, const char *fmt, ...) \ + __attribute__((format(printf, 3, 4))); /** * Set up logging information. -- cgit v1.1