aboutsummaryrefslogtreecommitdiffstats
path: root/include/log.h
diff options
context:
space:
mode:
authorLibravatar Jerzi Kaminsky <JerziKaminsky@users.noreply.github.com>2017-04-16 10:30:17 +0300
committerLibravatar Jerzi Kaminsky <JerziKaminsky@users.noreply.github.com>2017-04-16 16:39:53 +0300
commiteb3b1ec5f1ccdeccae237fa8c8662e795bb7fad7 (patch)
tree5dfa6984f5d64d1c63dfc402786f2023c7e33586 /include/log.h
parentMerge pull request #1171 from JerziKaminsky/misc_fixes (diff)
downloadsway-eb3b1ec5f1ccdeccae237fa8c8662e795bb7fad7.tar.gz
sway-eb3b1ec5f1ccdeccae237fa8c8662e795bb7fad7.tar.zst
sway-eb3b1ec5f1ccdeccae237fa8c8662e795bb7fad7.zip
Fix variadic forwarding in sway_assert
_sway_assert is a variadic function which tries to delegate to another variadic function. This requires a vprintf-style variant of the delegate. https://stackoverflow.com/a/150616
Diffstat (limited to 'include/log.h')
-rw-r--r--include/log.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/log.h b/include/log.h
index 2c4150e4..60b3763b 100644
--- a/include/log.h
+++ b/include/log.h
@@ -28,6 +28,9 @@ void _sway_log(const char *filename, int line, log_importance_t verbosity, const
28#define sway_log(VERBOSITY, FMT, ...) \ 28#define sway_log(VERBOSITY, FMT, ...) \
29 _sway_log(__FILE__, __LINE__, VERBOSITY, FMT, ##__VA_ARGS__) 29 _sway_log(__FILE__, __LINE__, VERBOSITY, FMT, ##__VA_ARGS__)
30 30
31#define sway_vlog(VERBOSITY, FMT, VA_ARGS) \
32 _sway_vlog(__FILE__, __LINE__, VERBOSITY, FMT, VA_ARGS)
33
31void error_handler(int sig); 34void error_handler(int sig);
32 35
33#endif 36#endif