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);
      ~~~~~~~~~~~~~ ^~~~~~~~~~~~
This commit is contained in:
Daniel Eklöf 2021-04-17 20:09:39 +02:00
parent 353c2f012a
commit 40686303ef
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

6
main.c
View file

@ -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;