Fix Clang 16 errors for invalid C99 constructs (-Wincompatible-pointer-types) #108
Loading…
Reference in a new issue
No description provided.
Delete branch "(deleted):clang-c99-fixes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
These errors were caused by
t_titlefunction having "void" parameterinstead of "ui_tab_t *tab", like everywhere else:
Also renamed
tparam int_titleof "src/uit_main.c" totab,for consistency with other functions.
This error appeared only in 1.24 release cycle, because changing
prototypes from "()" to "(void)" in
2cf47a7ec9changed meaning of the type from "any parameters, including ui_tab_t *"
to "no parameters at all", and this is where Clang starts to complain.
Bug: https://bugs.gentoo.org/928946
Signed-off-by: Eric Joldasov bratishkaerik@landless-city.net
These errors were caused by `t_title` function having "void" parameter instead of "ui_tab_t *tab", like everywhere else: ``` src/uit_conn.c:398:41: error: initialization of char * (*)(ui_tab_t *) from incompatible pointer type char * (*)(void) [-Wincompatible-pointer-types] 398 | ui_tab_type_t uit_conn[1] = { { t_draw, t_title, t_key, t_close } }; | ^~~~~~~ ``` Also renamed `t` param in `t_title` of "src/uit_main.c" to `tab`, for consistency with other functions. Reported in https://bugs.gentoo.org/928946 . Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net>dc7a158aa7to42590da474Only changed commit message, I hope it's a little bit more readable now.
Welp, some sloppy coding on my part. Pulled, thanks.
Thanks!
Pull request closed