summaryrefslogtreecommitdiff
path: root/common/quic.h
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2012-02-10 14:30:56 +0000
committerDaniel P. Berrange <berrange@redhat.com>2012-03-13 13:09:16 +0000
commit75c9e2f6799afa886a35ab32e2265965878e2bcf (patch)
tree69d5a33b0f96f21151d7b955ee2645a8ad6705bc /common/quic.h
parent34ccd7e4ba9fbef7b9f51ad972a35d05a4c81be4 (diff)
Add printf format annotations to all '...' functions
To allow the compile to detect incorrect printf formats, any var-args function should have a format annotation * common/macros.h: Helper to define ATTR_PRINTF for code which can't depend on glib * common/canvas_base.c, common/lz.h, common/macros.h: Annotate some var-args methods
Diffstat (limited to 'common/quic.h')
-rw-r--r--common/quic.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/common/quic.h b/common/quic.h
index f4ef854..74068f3 100644
--- a/common/quic.h
+++ b/common/quic.h
@@ -20,6 +20,7 @@
#define __QUIC_H
#include "quic_config.h"
+#include "macros.h"
typedef enum {
QUIC_IMAGE_TYPE_INVALID,
@@ -37,9 +38,9 @@ typedef void *QuicContext;
typedef struct QuicUsrContext QuicUsrContext;
struct QuicUsrContext {
- void (*error)(QuicUsrContext *usr, const char *fmt, ...);
- void (*warn)(QuicUsrContext *usr, const char *fmt, ...);
- void (*info)(QuicUsrContext *usr, const char *fmt, ...);
+ ATTR_PRINTF(2, 3) void (*error)(QuicUsrContext *usr, const char *fmt, ...);
+ ATTR_PRINTF(2, 3) void (*warn)(QuicUsrContext *usr, const char *fmt, ...);
+ ATTR_PRINTF(2, 3) void (*info)(QuicUsrContext *usr, const char *fmt, ...);
void *(*malloc)(QuicUsrContext *usr, int size);
void (*free)(QuicUsrContext *usr, void *ptr);
int (*more_space)(QuicUsrContext *usr, uint32_t **io_ptr, int rows_completed);