[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/4] Add fprintf_function for function pointers to f
From: |
Stefan Weil |
Subject: |
[Qemu-devel] [PATCH 1/4] Add fprintf_function for function pointers to fprintf-like functions |
Date: |
Fri, 22 Oct 2010 23:03:30 +0200 |
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 <address@hidden>
Signed-off-by: Stefan Weil <address@hidden>
---
qemu-common.h | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/qemu-common.h b/qemu-common.h
index d5ae420..7eeec8e 100644
--- a/qemu-common.h
+++ b/qemu-common.h
@@ -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
--
1.7.1
- [Qemu-devel] [PATCH 1/4] Add fprintf_function for function pointers to fprintf-like functions,
Stefan Weil <=