Fixed so much warnings generated by debug macros that caused the

compilation to fail on newer gcc 3.x.
This commit is contained in:
guillemj
2003-06-29 18:39:05 +00:00
parent 061cb96484
commit 4768c1f721
3 changed files with 30 additions and 65 deletions

View File

@@ -42,12 +42,12 @@
// if debug info turned on then GDBG_INFO does something
#ifdef GDBG_INFO_ON
#define GDBG_INFO gdbg_info
#define GDBG_INFO_MORE gdbg_info_more
#define GDBG_PRINTF gdbg_printf
#define GDBG_INFO(level, format, ...) gdbg_info(level, format, __VA_ARGS__)
#define GDBG_INFO_MORE(level, format, ...) gdbg_info_more(level, format, __VA_AR
#define GDBG_PRINTF(format, ...) gdbg_printf(format, __VA_ARGS__)
#define GDBG_ERROR_SET_CALLBACK gdbg_error_set_callback
#define GDBG_ERROR_CLEAR_CALLBACK gdbg_error_clear_callback
#define GDBG_ERROR_SET_CALLBACK(p) gdbg_error_set_callback(p)
#define GDBG_ERROR_CLEAR_CALLBACK(p) gdbg_error_clear_callback(p)
#define GDBG_GET_DEBUGLEVEL gdbg_get_debuglevel
#define GDBG_SET_DEBUGLEVEL gdbg_set_debuglevel
@@ -55,23 +55,12 @@
// otherwise GDBG_INFO does nothing
#else
#if defined(__WATCOMC__) || defined(__WATCOM_CPLUSPLUS__)
/* Turn off the dead code warnings. Also changed the macro definitions
* to use an 'if' rather than the ternary operator because the
* type of the result sub-expressions must match.
*
* w111: Meaningless use of an expression
* w201: Unreachable code
*/
#pragma disable_message (111, 201)
#endif /* defined(__WATCOMC__) || defined(__WATCOM_CPLUSPLUS__) */
#define GDBG_INFO(level, format, ...)
#define GDBG_INFO_MORE(level, format, ...)
#define GDBG_PRINTF(format, ...)
#define GDBG_INFO 0 && (unsigned long)
#define GDBG_INFO_MORE 0 && (unsigned long)
#define GDBG_PRINTF 0 && (unsigned long)
#define GDBG_ERROR_SET_CALLBACK 0 && (unsigned long)
#define GDBG_ERROR_CLEAR_CALLBACK 0 && (unsigned long)
#define GDBG_ERROR_SET_CALLBACK(p)
#define GDBG_ERROR_CLEAR_CALLBACK(p)
#define GDBG_GET_DEBUGLEVEL(x) 0
#define GDBG_SET_DEBUGLEVEL(a,b)

View File

@@ -42,12 +42,12 @@
// if debug info turned on then GDBG_INFO does something
#ifdef GDBG_INFO_ON
#define GDBG_INFO gdbg_info
#define GDBG_INFO_MORE gdbg_info_more
#define GDBG_PRINTF gdbg_printf
#define GDBG_INFO(level, format, ...) gdbg_info(level, format, __VA_ARGS__)
#define GDBG_INFO_MORE(level, format, ...) gdbg_info_more(level, format, __VA_AR
#define GDBG_PRINTF(format, ...) gdbg_printf(format, __VA_ARGS__)
#define GDBG_ERROR_SET_CALLBACK gdbg_error_set_callback
#define GDBG_ERROR_CLEAR_CALLBACK gdbg_error_clear_callback
#define GDBG_ERROR_SET_CALLBACK(p) gdbg_error_set_callback(p)
#define GDBG_ERROR_CLEAR_CALLBACK(p) gdbg_error_clear_callback(p)
#define GDBG_GET_DEBUGLEVEL gdbg_get_debuglevel
#define GDBG_SET_DEBUGLEVEL gdbg_set_debuglevel
@@ -55,24 +55,12 @@
// otherwise GDBG_INFO does nothing
#else
#if defined(__WATCOMC__) || defined(__WATCOM_CPLUSPLUS__)
/* Turn off the dead code warnings. Also changed the macro definitions
* to use an 'if' rather than the ternary operator because the
* type of the result sub-expressions must match.
*
* w111: Meaningless use of an expression
* w201: Unreachable code
* w302: Expression only useful for side-effects.
*/
#pragma disable_message (111, 201, 302)
#endif /* defined(__WATCOMC__) || defined(__WATCOM_CPLUSPLUS__) */
#define GDBG_INFO(level, format, ...)
#define GDBG_INFO_MORE(level, format, ...)
#define GDBG_PRINTF(format, ...)
#define GDBG_INFO 0 && (unsigned long)
#define GDBG_INFO_MORE 0 && (unsigned long)
#define GDBG_PRINTF 0 && (unsigned long)
#define GDBG_ERROR_SET_CALLBACK 0 && (unsigned long)
#define GDBG_ERROR_CLEAR_CALLBACK 0 && (unsigned long)
#define GDBG_ERROR_SET_CALLBACK(p)
#define GDBG_ERROR_CLEAR_CALLBACK(p)
#define GDBG_GET_DEBUGLEVEL(x) 0
#define GDBG_SET_DEBUGLEVEL(a,b)

View File

@@ -46,12 +46,12 @@
// if debug info turned on then GDBG_INFO does something
#if defined(GDBG_INFO_ON)
#define GDBG_INFO gdbg_info
#define GDBG_INFO_MORE gdbg_info_more
#define GDBG_PRINTF gdbg_printf
#define GDBG_INFO(level, format, ...) gdbg_info(level, format, __VA_ARGS__)
#define GDBG_INFO_MORE(level, format, ...) gdbg_info_more(level, format, __VA_ARGS__)
#define GDBG_PRINTF(format, ...) gdbg_printf(format, __VA_ARGS__)
#define GDBG_ERROR_SET_CALLBACK gdbg_error_set_callback
#define GDBG_ERROR_CLEAR_CALLBACK gdbg_error_clear_callback
#define GDBG_ERROR_SET_CALLBACK(p) gdbg_error_set_callback(p)
#define GDBG_ERROR_CLEAR_CALLBACK(p) gdbg_error_clear_callback(p)
#define GDBG_GET_DEBUGLEVEL gdbg_get_debuglevel
#define GDBG_SET_DEBUGLEVEL gdbg_set_debuglevel
@@ -59,24 +59,12 @@
// otherwise GDBG_INFO does nothing
#else
#if defined(__WATCOMC__) || defined(__WATCOM_CPLUSPLUS__)
/* Turn off the dead code warnings. Also changed the macro definitions
* to use an 'if' rather than the ternary operator because the
* type of the result sub-expressions must match.
*
* w111: Meaningless use of an expression
* w201: Unreachable code
* w302: Expression only useful for side-effects.
*/
#pragma disable_message (111, 201, 302)
#endif /* defined(__WATCOMC__) || defined(__WATCOM_CPLUSPLUS__) */
#define GDBG_INFO(level, format, ...)
#define GDBG_INFO_MORE(level, format, ...)
#define GDBG_PRINTF(format, ...)
#define GDBG_INFO 0 && (unsigned long)
#define GDBG_INFO_MORE 0 && (unsigned long)
#define GDBG_PRINTF 0 && (unsigned long)
#define GDBG_ERROR_SET_CALLBACK 0 && (unsigned long)
#define GDBG_ERROR_CLEAR_CALLBACK 0 && (unsigned long)
#define GDBG_ERROR_SET_CALLBACK(p)
#define GDBG_ERROR_CLEAR_CALLBACK(p)
#define GDBG_GET_DEBUGLEVEL(x) 0
#define GDBG_SET_DEBUGLEVEL(a,b)