tasn pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=ba82d226929434eef20908a0a4bde5e5a2ba140f
commit ba82d226929434eef20908a0a4bde5e5a2ba140f Author: Tom Hacohen <t...@stosb.com> Date: Mon Jun 22 15:37:13 2015 +0100 Logging: Fix broken logging macros. This is macro 101, you don't EVER put multiple statements in a macro like that. See Chris's commits, these broken macros already introduced (subtle) bugs. Always surround macros in "do {} while()" unless you absolutely can't (like when you declare a new variable to be used in the scope). Why is it even there? I think we can safely assume eina log is available for usage in E... @fix --- src/bin/e_log.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bin/e_log.h b/src/bin/e_log.h index 4100780..325539f 100644 --- a/src/bin/e_log.h +++ b/src/bin/e_log.h @@ -27,11 +27,11 @@ EINTERN int e_log_shutdown(void); #undef WRN #undef ERR #undef CRI -#define DBG(...) printf(__VA_ARGS__); putc('\n', stdout) -#define INF(...) printf(__VA_ARGS__); putc('\n', stdout) -#define WRN(...) printf(__VA_ARGS__); putc('\n', stdout) -#define ERR(...) printf(__VA_ARGS__); putc('\n', stdout) -#define CRI(...) printf(__VA_ARGS__); putc('\n', stdout) +#define DBG(...) do { printf(__VA_ARGS__); putc('\n', stdout); } while(0) +#define INF(...) do { printf(__VA_ARGS__); putc('\n', stdout); } while(0) +#define WRN(...) do { printf(__VA_ARGS__); putc('\n', stdout); } while(0) +#define ERR(...) do { printf(__VA_ARGS__); putc('\n', stdout); } while(0) +#define CRI(...) do { printf(__VA_ARGS__); putc('\n', stdout); } while(0) #endif #endif --