only define DPRINT macro if the compiler can handle __VA_ARGS__ reduces Warnings when compiling with MSVC Modified: trunk/reactos/include/reactos/debug.h _____
Modified: trunk/reactos/include/reactos/debug.h --- trunk/reactos/include/reactos/debug.h 2005-10-17 13:14:04 UTC (rev 18519) +++ trunk/reactos/include/reactos/debug.h 2005-10-17 13:57:40 UTC (rev 18520) @@ -61,8 +61,9 @@
#define CHECKPOINT do { DbgPrint("%s:%d\n",__FILE__,__LINE__); } while(0);
#else - - #define DPRINT(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0) + #if defined (__STDC__) + #define DPRINT(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0) + #endif #define CHECKPOINT
#endif @@ -70,8 +71,10 @@ #else
/* On non-debug builds, we never show these */ + #if defined (__STDC__) #define DPRINT1(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0) #define DPRINT(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0) + #endif #define CHECKPOINT1 #define CHECKPOINT #endif