Re: Bug#1121240: libhdf4: FTBFS on armhf (-Wincompatible-pointer-types)

Emanuele Rocca <[email protected]>
Newsgroups gmane.linux.debian.ports.arm
Message-ID <[email protected]>
On 2025-11-23 04:33, Sebastiaan Couwenberg wrote:
> Making this a warning with following does not resolve the FTBFS:
> 
>  ifneq (,$(filter $(DEB_BUILD_ARCH),armhf))
>  export DEB_CFLAGS_MAINT_APPEND = -Wno-error=incompatible-pointer-types
>  endif
> 
> It then fails due to:
> 
>  array.c:399:21: error: too many arguments to function 'xlen_funct'; expected 0, have 1
>    399 |             len += (*xlen_funct)(vp);
>        |                    ~^~~~~~~~~~~~ ~~
> 

The prototype of xlen_funct has no arguments defined. In C23 declaring a
function as int foo() is equivalent as declaring that it takes no
argument, hence calling it with arguments becomes an error. See:
https://en.wikipedia.org/wiki/C23_(C_standard_revision)#Syntax

You can either fix the code or tell the compiler to stick to older
versions of the standard, something like:

  export DEB_CFLAGS_MAINT_APPEND += -std=c17
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.