Mesa (master): radeon: use C99 style in macros with variable arguments

Brian Paul brianp at kemper.freedesktop.org
Thu Mar 24 14:37:46 UTC 2011


Module: Mesa
Branch: master
Commit: c22a7f9045ff7a4a9505225a133b25e262958e1c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c22a7f9045ff7a4a9505225a133b25e262958e1c

Author: Iain Hibbert <plunky at rya-online.net>
Date:   Thu Mar 24 08:35:48 2011 -0600

radeon: use C99 style in macros with variable arguments

Signed-off-by: Iain Hibbert <plunky at netbsd.org>

---

 src/mesa/drivers/dri/radeon/radeon_debug.h |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/mesa/drivers/dri/radeon/radeon_debug.h b/src/mesa/drivers/dri/radeon/radeon_debug.h
index ef8b967..449c27a 100644
--- a/src/mesa/drivers/dri/radeon/radeon_debug.h
+++ b/src/mesa/drivers/dri/radeon/radeon_debug.h
@@ -110,30 +110,30 @@ extern void _radeon_print(const radeon_debug_type_t type,
  * Print out debug message if channel specified by type is enabled
  * and compile time debugging level is at least as high as level parameter
  */
-#define radeon_print(type, level, message, ...) do {		\
+#define radeon_print(type, level, ...) do {			\
 	const radeon_debug_level_t _debug_level = (level);	\
 	const radeon_debug_type_t _debug_type = (type);		\
 	/* Compile out if level of message is too high */	\
 	if (radeon_is_debug_enabled(type, level)) {		\
 		_radeon_print(_debug_type, _debug_level,	\
-			(message), ## __VA_ARGS__);		\
+			__VA_ARGS__);				\
 	}							\
 } while(0)
 
 /**
  * printf style function for writing error messages.
  */
-#define radeon_error(message, ...) do {				\
+#define radeon_error(...) do {					\
 	radeon_print(RADEON_GENERAL, RADEON_CRITICAL,		\
-		(message), ## __VA_ARGS__);			\
+		__VA_ARGS__);					\
 } while(0)
 
 /**
  * printf style function for writing warnings.
  */
-#define radeon_warning(message, ...) do {			\
+#define radeon_warning(...) do {				\
 	radeon_print(RADEON_GENERAL, RADEON_IMPORTANT,		\
-		(message), ## __VA_ARGS__);			\
+		__VA_ARGS__);					\
 } while(0)
 
 extern void radeon_init_debug(void);
@@ -158,13 +158,13 @@ static inline void radeon_debug_remove_indent(void)
    I suppose we could inline this and use macro to fetch out __LINE__ and stuff in case we run into trouble
    with other compilers ... GLUE!
 */
-#define WARN_ONCE(a, ...)      do { \
+#define WARN_ONCE(...)      do { \
        static int __warn_once=1; \
        if(__warn_once){ \
                radeon_warning("*********************************WARN_ONCE*********************************\n"); \
                radeon_warning("File %s function %s line %d\n", \
                        __FILE__, __FUNCTION__, __LINE__); \
-               radeon_warning(  (a), ## __VA_ARGS__);\
+               radeon_warning(__VA_ARGS__);\
                radeon_warning("***************************************************************************\n"); \
                __warn_once=0;\
                } \




More information about the mesa-commit mailing list