Define QMD_SAVELINK() only for QUEUE_MACRO_DEBUG_TRASH case. Otherwise
with QUEUE_MACRO_DEBUG_TRACE compilation fails due to unused variable.
This commit is contained in:
parent
6933902df4
commit
ee7e6f676e
@ -155,19 +155,15 @@ struct qm_trace {
|
||||
#endif /* QUEUE_MACRO_DEBUG_TRACE */
|
||||
|
||||
#ifdef QUEUE_MACRO_DEBUG_TRASH
|
||||
#define QMD_SAVELINK(name, link) void **name = (void *)&(link)
|
||||
#define TRASHIT(x) do {(x) = (void *)-1;} while (0)
|
||||
#define QMD_IS_TRASHED(x) ((x) == (void *)(intptr_t)-1)
|
||||
#else /* !QUEUE_MACRO_DEBUG_TRASH */
|
||||
#define QMD_SAVELINK(name, link)
|
||||
#define TRASHIT(x)
|
||||
#define QMD_IS_TRASHED(x) 0
|
||||
#endif /* QUEUE_MACRO_DEBUG_TRASH */
|
||||
|
||||
#if defined(QUEUE_MACRO_DEBUG_TRACE) || defined(QUEUE_MACRO_DEBUG_TRASH)
|
||||
#define QMD_SAVELINK(name, link) void **name = (void *)&(link)
|
||||
#else /* !QUEUE_MACRO_DEBUG_TRACE && !QUEUE_MACRO_DEBUG_TRASH */
|
||||
#define QMD_SAVELINK(name, link)
|
||||
#endif /* QUEUE_MACRO_DEBUG_TRACE || QUEUE_MACRO_DEBUG_TRASH */
|
||||
|
||||
#ifdef __cplusplus
|
||||
/*
|
||||
* In C++ there can be structure lists and class lists:
|
||||
|
Loading…
Reference in New Issue
Block a user