diff options
| author | Dennis Camera <skonfig@dtnr.ch> | 2022-08-21 09:41:22 +0200 |
|---|---|---|
| committer | Dennis Camera <skonfig@dtnr.ch> | 2022-08-21 09:41:22 +0200 |
| commit | db2282253024c86d16622ca7650768cd476c023d (patch) | |
| tree | 1116e863010c2a5239d4b4a6a806bbe419a8d75b | |
| parent | fbde8ff0312dfd87cd4916207a0077ac4f35d142 (diff) | |
| download | skonfig-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.h | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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 |
