]> Git Repo - qemu.git/commitdiff
Add fprintf_function for function pointers to fprintf-like functions
authorStefan Weil <[email protected]>
Fri, 22 Oct 2010 21:03:30 +0000 (23:03 +0200)
committerBlue Swirl <[email protected]>
Sat, 30 Oct 2010 08:01:57 +0000 (08:01 +0000)
This kind of function pointers is used very often in qemu.

The new data type uses format checking with GCC_FMT_ATTR
and will be used in later patches.

Cc: Blue Swirl <[email protected]>
Signed-off-by: Stefan Weil <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
qemu-common.h

index d31f3661d249a243695fff34c3bfbf6d371c08ff..3496e4f5bba8b471c408d0ccb415303a9541bd9c 100644 (file)
@@ -81,6 +81,9 @@ struct iovec {
 #define GCC_FMT_ATTR(n, m)
 #endif
 
+typedef int (*fprintf_function)(FILE *f, const char *fmt, ...)
+    GCC_FMT_ATTR(2, 3);
+
 #ifdef _WIN32
 #define fsync _commit
 #define lseek _lseeki64
This page took 0.025788 seconds and 4 git commands to generate.