Open thesamesam opened 1 year ago
Thanks. I fixed incompatible function pointer types error. https://github.com/arakiken/mlterm/commit/dbf581cccc8ca59d92c8f84b563d5d2376c11208
We seem to still be seeing this in ui_window_cairo.c
(https://bugs.gentoo.org/919221):
ui_window_cairo.c:57:12: error: incompatible pointer to integer conversion
initializing 'u_long' (aka 'unsigned long') with an expression of type
'void *' [-Wint-conversion]
57 | u_long pixel = cairo_get_user_data(cr, (cairo_user_data_key_t*)2);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ui_window_cairo.c:112:25: warning: cast to 'void *' from smaller integer type
'int' [-Wint-to-void-pointer-cast]
112 | (void*)((fg_color->red << 16) | (fg_color->green << 8) |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
113 | (fg_color->blue) | (fg_color->alpha << 24)),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ui_window_cairo.c:205:25: warning: cast to 'void *' from smaller integer type
'int' [-Wint-to-void-pointer-cast]
205 | (void*)((fg_color->red << 16) | (fg_color->green << 8) |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
206 | (fg_color->blue) | (fg_color->alpha << 24)),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GCC 14 will make this an error by default.
Thanks. This error has been already fixed. -> https://github.com/arakiken/mlterm/commit/f971955cf54a721e6a53191c3b86fbdab4bfbfd5
Originally reported downstream in Gentoo at https://bugs.gentoo.org/870565 when building 3.9.2.
Clang 16 makes
-Wincompatible-function-pointer-types
fatal. I had the following errors when building mlterm:Full build.log at https://bugs.gentoo.org/attachment.cgi?id=806698.