]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: incompatible pointer type suspected with -DDEBUG_UNIT 20250415-gcc-15-unittest
authorWilliam Lallemand <wlallemand@haproxy.com>
Tue, 15 Apr 2025 13:49:44 +0000 (15:49 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Tue, 15 Apr 2025 13:49:44 +0000 (15:49 +0200)
commitc291a5c73c6e953c49cc4673b02a4e6f533ad45e
treeffb8e3e0fa32abcfd55b1f9a0745ee03262562c8
parent05ebb448b5df6d72e2efd290be84093ae985e49a
BUILD: incompatible pointer type suspected with -DDEBUG_UNIT

src/jws.c: In function '__jws_init':
src/jws.c:594:38: error: passing argument 2 of 'hap_register_unittest' from incompatible pointer type [-Wincompatible-pointer-types]
  594 |         hap_register_unittest("jwk", jwk_debug);
      |                                      ^~~~~~~~~
      |                                      |
      |                                      int (*)(int,  char **)
In file included from include/haproxy/api.h:36,
                 from include/import/ebtree.h:251,
                 from include/import/ebmbtree.h:25,
                 from include/haproxy/jwt-t.h:25,
                 from src/jws.c:5:
include/haproxy/init.h:37:52: note: expected 'int (*)(void)' but argument is of type 'int (*)(int,  char **)'
   37 | void hap_register_unittest(const char *name, int (*fct)());
      |                                              ~~~~~~^~~~~~

GCC 15 is warning because the function pointer does have its
arguments in the register function.

Should fix issue #2929.
include/haproxy/init.h