Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/debug.h

    r174156fd raf3235d  
    3737
    3838#include <log.h>
    39 #include <symtab_lookup.h>
     39#include <printf/verify.h>
     40#include <symtab.h>
    4041
    4142#define CALLER  ((uintptr_t) __builtin_return_address(0))
     43
     44/* An empty printf function to ensure syntactic correctness of disabled debug prints. */
     45static inline void dummy_printf(const char *fmt, ...) _HELENOS_PRINTF_ATTRIBUTE(1, 2);
     46static inline void dummy_printf(const char *fmt, ...)
     47{
     48}
    4249
    4350#ifdef CONFIG_LOG
     
    5360        do { \
    5461                log(LF_OTHER, LVL_DEBUG, \
    55                     "%s() from %s at %s:%u: " format,__func__, \
     62                    "%s() from %s at %s:%u: " format, __func__, \
    5663                    symtab_fmt_name_lookup(CALLER), __FILE__, __LINE__, \
    5764                    ##__VA_ARGS__); \
     
    6067#else /* CONFIG_LOG */
    6168
    62 #define LOG(format, ...)
     69#define LOG(format, ...) dummy_printf(format, ##__VA_ARGS__)
    6370
    6471#endif /* CONFIG_LOG */
Note: See TracChangeset for help on using the changeset viewer.