[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1057542: ap-utils: FTBFS: input.c:340:43: error: invalid application of ‘sizeof’ to incomplete type ‘ITEM’ {aka ‘struct tagITEM’}



On 2023-12-05 23:03 +0100, Santiago Vila wrote:

> Package: src:ap-utils
> Version: 1.5-5
> Severity: serious
> Tags: ftbfs
>
> Dear maintainer:
>
> During a rebuild of all packages in unstable, your package failed to build:
>
> [snip]
>
> The above is just how the build ends and not necessarily the most relevant part.

Indeed, the actual error was missing.  To work around the massive amount
of -Woverflow warnings (there are literally thousands of them), I added
-Wno-overflow to DEB_CFLAGS_MAINT_APPEND, and this is what I got:

,----
| gcc -DHAVE_CONFIG_H -I. -I.. -I../intl  -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -ffile-prefix-map=/usr/local/src/deb-src/ap-utils/ap-utils=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wall -pedantic -Wno-overflow -Wno-error=format-security -Wall -W -c -o input.o input.c
| input.c: In function 'get_value':
| input.c:129:18: warning: variable 'y' set but not used [-Wunused-but-set-variable]
|   129 |     int c, i, x, y;
|       |                  ^
| input.c: In function 'menu_choose':
| input.c:340:43: error: invalid application of 'sizeof' to incomplete type 'ITEM' {aka 'struct tagITEM'}
|   340 |     ITEM **menu_item = calloc(num, sizeof(ITEM)), **ip = menu_item;
|       |                                           ^~~~
`----

Since ncurses patchlevel 20231021 the ITEM structure is opaque, hence
its size is unknown to the compiler.  This probably means that the
menu_choose() function needs some substantial changes.  I have not
investigated further, if somebody cares about this package and the old
AP points it supports they will have to do the work.

Cheers,
       Sven


Reply to: