mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
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:
parent
353c2f012a
commit
40686303ef
1 changed files with 4 additions and 2 deletions
6
main.c
6
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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue