HAProxy community

Build warning on Raspbian buster on Pi 4

Hello there,

I’m able to build haproxy 2.0.0 on my Raspberry Pi4 using the following ARCH_FLAG arguments:

make TARGET=linux-glibc ARCH_FLAGS='-mbe32 -march=armv7-r' USE_NS=1 USE_TFO=1 USE_OPENSSL=1 USE_ZLIB=1 USE_LUA=1 USE_PCRE=1 USE_SYSTEMD=1 LUA_LIB=/usr/local/lib

However I’m getting a warning coming from cfgparse.c which is bugging me - can this be ignored? can anyone suggest a patch? TIA. John.

  CC      src/cfgparse.o
src/cfgparse.c: In function ‘check_config_validity’:
src/cfgparse.c:3693:33: warning: argument 1 range [2147483648, 4294967295] exceeds maximum object size 2147483647 [-Walloc-size-larger-than=]
     newsrv->idle_orphan_conns = calloc((unsigned int)global.nbthread, sizeof(*newsrv->idle_orphan_conns));
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/cfgparse.c:24:
/usr/include/stdlib.h:541:14: note: in a call to allocation function ‘calloc’ declared here
 extern void *calloc (size_t __nmemb, size_t __size)
              ^~~~~~

No, I don’t think this should be ignored.

Could you file a bug on github?

1 Like