aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-04-17 18:09:39 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-04-17 18:09:39 +0000
commit40686303efab82571ea37d0bf901360ed2219795 (patch)
tree83e7363745c87106beabfa51f4b6505e59588752 /main.c
parentmain: call fcft_log_init(). Note that this requires fcft >= 2.3.90 (diff)
main: explicitly cast log_colorize to enum fcft_log_colorize
Fixes error in Clang builds: ../../foot/main.c:376:19: error: implicit conversion from enumeration type 'enum log_colorize' to different enumeration type 'enum fcft_log_colorize' [-Werror,-Wenum-conversion] fcft_log_init(log_colorize, as_server && log_syslog, log_level + 1); ~~~~~~~~~~~~~ ^~~~~~~~~~~~
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/main.c b/main.c
index 3e59ea96..19c1904b 100644
--- a/main.c
+++ b/main.c
@@ -372,8 +372,10 @@ main(int argc, char *const *argv)
as_server ? LOG_FACILITY_DAEMON : LOG_FACILITY_USER, log_level);
_Static_assert(LOG_CLASS_ERROR + 1 == FCFT_LOG_CLASS_ERROR,
- "fixme: fcft log level enum offset");
- fcft_log_init(log_colorize, as_server && log_syslog, log_level + 1);
+ "fcft log level enum offset");
+ _Static_assert((int)LOG_COLORIZE_ALWAYS == (int)FCFT_LOG_COLORIZE_ALWAYS,
+ "fcft colorize enum mismatch");
+ fcft_log_init((enum fcft_log_colorize)log_colorize, as_server && log_syslog, log_level + 1);
argc -= optind;
argv += optind;