>From b7e77b71d1f2d8ff6741e534911e09f10e3f3d4e Mon Sep 17 00:00:00 2001
From: Pauli Nieminen <[email protected]>
Date: Mon, 20 Jul 2009 14:39:57 +0300
Subject: [PATCH 01/15] libdrm: Add function attribute for debug
functions to let gcc check parameter correctness.

---
 libdrm/xf86drm.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c
index 26dd812..4214b91 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, ...)
-- 
1.6.3.3

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to