Removed C99 iso warning.
This commit is contained in:
parent
e11f9bea73
commit
0524f6ada9
|
|
@ -9,17 +9,21 @@
|
|||
#endif
|
||||
|
||||
#if DEBUG > 0
|
||||
#define debug_printf(fmt, ...) \
|
||||
#define debug_printf(...) \
|
||||
do { \
|
||||
fprintf(stderr, "\033[33mINFO\033[m: %s:%d:%s(): " fmt "\n", __FILE__, __LINE__, __func__, ##__VA_ARGS__); \
|
||||
fprintf(stderr, "\033[33mINFO\033[m: %s:%d:%s(): ", __FILE__, __LINE__, __func__); \
|
||||
fprintf(stderr, __VA_ARGS__); \
|
||||
fputc('\n', stderr); \
|
||||
} while (0)
|
||||
#else
|
||||
#define debug_printf(fmt, ...) do {} while (0)
|
||||
#define debug_printf(...) do {} while (0)
|
||||
#endif
|
||||
|
||||
#define error_printf(fmt, ...) \
|
||||
#define error_printf(...) \
|
||||
do { \
|
||||
fprintf(stderr, "\033[31mERROR\033[m: %s:%d:%s(): " fmt "\n", __FILE__, __LINE__, __func__, ##__VA_ARGS__); \
|
||||
fprintf(stderr, "\033[31mERROR\033[m: %s:%d:%s(): ", __FILE__, __LINE__, __func__); \
|
||||
fprintf(stderr, __VA_ARGS__); \
|
||||
fputc('\n', stderr); \
|
||||
} while (0)
|
||||
|
||||
#endif // ERRORS_H
|
||||
Loading…
Reference in New Issue