summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Camera <skonfig@dtnr.ch>2022-08-21 09:41:22 +0200
committerDennis Camera <skonfig@dtnr.ch>2022-08-21 09:41:22 +0200
commitdb2282253024c86d16622ca7650768cd476c023d (patch)
tree1116e863010c2a5239d4b4a6a806bbe419a8d75b
parentfbde8ff0312dfd87cd4916207a0077ac4f35d142 (diff)
downloadskonfig-c-db2282253024c86d16622ca7650768cd476c023d.tar.gz
skonfig-c-db2282253024c86d16622ca7650768cd476c023d.zip
[src/log.h] Fix variadic macro error (-pedantic)
src/skonfig.c: In function ‘main’: src/skonfig.c:229:64: error: ISO C99 requires at least one argument for the "..." in a variadic macro 229 | sk_error("cannot find configuration directory."); | ^
-rw-r--r--src/log.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/log.h b/src/log.h
index 0ad1b97..9cee8c2 100644
--- a/src/log.h
+++ b/src/log.h
@@ -111,7 +111,7 @@ int sk_log(sk_log_level level, const char *restrict format, ...);
*
* cf. sk_log().
*/
-#define sk_error(format, ...) sk_log(SK_LOG_ERROR, format, ## __VA_ARGS__)
+#define sk_error(...) sk_log(SK_LOG_ERROR, __VA_ARGS__)
/**
* sk_warn:
@@ -119,7 +119,7 @@ int sk_log(sk_log_level level, const char *restrict format, ...);
*
* cf. sk_log().
*/
-#define sk_warn(format, ...) sk_log(SK_LOG_WARN, format, ## __VA_ARGS__)
+#define sk_warn(...) sk_log(SK_LOG_WARN, __VA_ARGS__)
/**
* sk_info:
@@ -127,7 +127,7 @@ int sk_log(sk_log_level level, const char *restrict format, ...);
*
* cf. sk_log().
*/
-#define sk_info(format, ...) sk_log(SK_LOG_INFO, format, ## __VA_ARGS__)
+#define sk_info(...) sk_log(SK_LOG_INFO, __VA_ARGS__)
/**
* sk_debug:
@@ -135,7 +135,7 @@ int sk_log(sk_log_level level, const char *restrict format, ...);
*
* cf. sk_log().
*/
-#define sk_debug(format, ...) sk_log(SK_LOG_DEBUG, format, ## __VA_ARGS__)
+#define sk_debug(...) sk_log(SK_LOG_DEBUG, __VA_ARGS__)
/**
* sk_trace:
@@ -143,6 +143,6 @@ int sk_log(sk_log_level level, const char *restrict format, ...);
*
* cf. sk_log().
*/
-#define sk_trace(format, ...) sk_log(SK_LOG_TRACE, format, ## __VA_ARGS__)
+#define sk_trace(...) sk_log(SK_LOG_TRACE, __VA_ARGS__)
#endif