ref: 3ad41348d203759dac2ad531de8ff1e55b6454c9
parent: c71416582715945623f60f712260de168c878978
author: Hugo Beauzée-Luyssen <hugo@videolan.org>
date: Thu Sep 20 09:57:09 EDT 2018
validate: Don't name variadic macro parameters As it is forbidden by ISO C
--- a/include/common/validate.h
+++ b/include/common/validate.h
@@ -37,11 +37,11 @@
#define debug_abort abort
#endif
-#define validate_input_or_ret_with_msg(x, r, msg...) \
+#define validate_input_or_ret_with_msg(x, r, ...) \
if (!(x)) { \
fprintf(stderr, "Input validation check \'%s\' failed in %s!\n", \
#x, __PRETTY_FUNCTION__); \
- fprintf(stderr, msg); \
+ fprintf(stderr, __VA_ARGS__); \
debug_abort(); \
return r; \
}