debug: Add macro to mark variables that are only used in DBG statements
Some variables that are only assigned to be used in DBG statements will otherwise trigger a "set but not used" warning/error if DEBUG_LEVEL is too low.
This commit is contained in:
@@ -140,6 +140,11 @@ enum level_t {
|
||||
# define DBG4(...) {}
|
||||
#endif
|
||||
|
||||
/** mark variables that are only used in DBG statements */
|
||||
#ifndef DBG_UNUSED
|
||||
# define DBG_UNUSED __attribute__((unused))
|
||||
#endif
|
||||
|
||||
/** dbg function hook, uses dbg_default() by default */
|
||||
extern void (*dbg) (debug_t group, level_t level, char *fmt, ...);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user