After searching quite a bit in the Internet for a solution I decided to ask here if my solution is fine.
I\'m trying to write a simple and modular C logging library inte
Can't your disabled version simply be a constant:
#ifndef NLOG /* NLOG not defined -> enable logging */
int logger_init(logger_t *logger) {
...
}
#else /* NLOG defined --> the logging system must be disabled */
#define logger_init(logger) 0
#endif /* NLOG */
This way, you just have (after pre-compilation): result = 0;
which shouldn't produce any warnings.