Bug#1078228: 1oom: FTBFS with GCC 14: error: passing argument 4 of 'menu_make_enum' from incompatible pointer type
Andreas Beckmann
anbe at debian.org
Thu Aug 8 20:40:06 BST 2024
Source: 1oom
Version: 1.8.1-1
Severity: serious
Tags: ftbfs
Justification: fails to build from source (but built successfully in the past)
Hi,
1oom started to FTBFS when GCC 14 was made the default compiler:
gcc -DHAVE_CONFIG_H -I. -I../../../src -I../../../src/os/unix -I../../../src/game -I../../../src -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/1oom-1.8.1=. -fstack-protector-strong -fstack-clash-prote
ction -Wformat -Werror=format-security -fcf-protection -c -o uimainmenu.o uimainmenu.c
uimainmenu.c: In function 'main_menu_make_game_custom_page':
uimainmenu.c:357:88: error: passing argument 4 of 'menu_make_enum' from incompatible pointer type [-Wincompatible-pointer-types]
357 | menu_make_enum(menu_allocate_item(), "Difficulty", mm_get_custom_difficulty_value, &game_opt_custom.difficulty, 0, DIFFICULTY_NUM - 1, MOO_KEY_d);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| difficulty_t *
In file included from uimainmenu.c:21:
../../../src/menu.h:104:123: note: expected 'int *' but argument is of type 'difficulty_t *'
104 | static inline void menu_make_enum(struct menu_item_data_s *d, const char *text, const char *(*get_text_value) (int), int *value_ptr, int value_min, int value_max, mookey_t key)
| ~~~~~^~~~~~~~~
uimainmenu.c: In function 'main_menu_make_game_custom_galaxy_page':
uimainmenu.c:368:83: error: passing argument 4 of 'menu_make_enum' from incompatible pointer type [-Wincompatible-pointer-types]
368 | menu_make_enum(menu_allocate_item(), "Size", mm_get_custom_galaxy_size_value, &game_opt_custom.galaxy_size, 0, GALAXY_SIZE_HUGE, MOO_KEY_s);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| galaxy_size_t *
../../../src/menu.h:104:123: note: expected 'int *' but argument is of type 'galaxy_size_t *'
104 | static inline void menu_make_enum(struct menu_item_data_s *d, const char *text, const char *(*get_text_value) (int), int *value_ptr, int value_min, int value_max, mookey_t key)
| ~~~~~^~~~~~~~~
uimainmenu.c: In function 'main_menu_make_game_custom_homeworlds_page':
uimainmenu.c:381:82: error: passing argument 4 of 'menu_make_enum' from incompatible pointer type [-Wincompatible-pointer-types]
381 | menu_make_enum(menu_allocate_item(), "Special", mm_get_custom_special_value, &game_opt_custom.homeworlds.special, 0, PLANET_SPECIAL_4XTECH, MOO_KEY_e);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| planet_special_t * {aka enum planet_special_e *}
../../../src/menu.h:104:123: note: expected 'int *' but argument is of type 'planet_special_t *' {aka 'enum planet_special_e *'}
104 | static inline void menu_make_enum(struct menu_item_data_s *d, const char *text, const char *(*get_text_value) (int), int *value_ptr, int value_min, int value_max, mookey_t key)
| ~~~~~^~~~~~~~~
make[5]: *** [Makefile:564: uimainmenu.o] Error 1
Andreas
More information about the Pkg-games-devel
mailing list