diff options
author | Pauli Nieminen <suokkos@gmail.com> | 2009-07-20 14:39:57 +0300 |
---|---|---|
committer | Pauli Nieminen <suokkos@gmail.com> | 2009-08-25 02:50:05 +0300 |
commit | 1f8c7fb2c93a3bd23eab3f0ae8a627f249578dfd (patch) | |
tree | 327118afc52f32192149a074c4505c77c1c14443 | |
parent | 5b31bd691aae86af9ef32b7eb122c9bee2550b26 (diff) |
libdrm: Add function attribute for debug functions to let gcc check parameter correctness.
-rw-r--r-- | libdrm/xf86drm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c index 26dd8129..4214b912 100644 --- a/libdrm/xf86drm.c +++ b/libdrm/xf86drm.c @@ -107,13 +107,16 @@ void drmSetServerInfo(drmServerInfoPtr info) * \internal * This function is a wrapper around vfprintf(). */ +static int drmDebugPrint(const char *format, va_list ap) __attribute__((format(printf,1,0))); static int drmDebugPrint(const char *format, va_list ap) { return vfprintf(stderr, format, ap); } -static int (*drm_debug_print)(const char *format, va_list ap) = drmDebugPrint; +static int (*drm_debug_print)(const char *format, va_list ap) __attribute__((format(printf,1,0))) = drmDebugPrint; + +void drmMsg(const char *format, ...) __attribute__((format(printf,1,2))); void drmMsg(const char *format, ...) |