From f7c4dc007f5ae964bc4357e9abefcf64131b84c9 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 29 Aug 2006 22:30:58 +0000 Subject: _mesa_debug() should be a no-op when not compiled with DEBUG defined. --- src/mesa/main/imports.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c index 08f44a8f88..a09c497795 100644 --- a/src/mesa/main/imports.c +++ b/src/mesa/main/imports.c @@ -1166,9 +1166,9 @@ _mesa_error( GLcontext *ctx, GLenum error, const char *fmtString, ... ) void _mesa_debug( const GLcontext *ctx, const char *fmtString, ... ) { +#ifdef DEBUG char s[MAXSTRING]; va_list args; - (void) ctx; va_start(args, fmtString); vsnprintf(s, MAXSTRING, fmtString, args); va_end(args); @@ -1177,6 +1177,9 @@ _mesa_debug( const GLcontext *ctx, const char *fmtString, ... ) #else fprintf(stderr, "Mesa: %s", s); #endif +#endif /* DEBUG */ + (void) ctx; + (void) fmtString; } /*@}*/ -- cgit v1.2.3