skupperproject / skupper-router

An application-layer router for Skupper networks
https://skupper.io
Apache License 2.0
14 stars 18 forks source link

warning: type of 'qd_server_listener' does not match original declaration [-Wlto-type-mismatch] #343

Open jiridanek opened 2 years ago

jiridanek commented 2 years ago

This does not make any sense to me

/tmp/skupper-rpms/skupper-router/src/server_private.h:54:16: warning: type of 'qd_server_listener' does not match original declaration [-Wlto-type-mismatch]
 qd_listener_t *qd_server_listener(qd_server_t *server);
                ^
/tmp/skupper-rpms/skupper-router/src/server.c:1613:16: note: 'qd_server_listener' was previously declared here
 qd_listener_t *qd_server_listener(qd_server_t *server)
                ^
/tmp/skupper-rpms/skupper-router/src/server.c:1613:16: note: code may be misoptimized unless -fno-strict-aliasing is used
/tmp/skupper-rpms/skupper-router/include/qpid/dispatch/server.h:573:6: warning: type of 'qd_listener_listen' does not match original declaration [-Wlto-type-mismatch]
 bool qd_listener_listen(qd_listener_t *l);
      ^
/tmp/skupper-rpms/skupper-router/src/server.c:1654:6: note: 'qd_listener_listen' was previously declared here
 bool qd_listener_listen(qd_listener_t *li) {
      ^
/tmp/skupper-rpms/skupper-router/src/server.c:1654:6: note: code may be misoptimized unless -fno-strict-aliasing is used
/tmp/skupper-rpms/skupper-router/src/server_private.h:58:6: warning: type of 'qd_listener_decref' does not match original declaration [-Wlto-type-mismatch]
 void qd_listener_decref(qd_listener_t* ct);
      ^
/tmp/skupper-rpms/skupper-router/src/server.c:1661:6: note: 'qd_listener_decref' was previously declared here
 void qd_listener_decref(qd_listener_t* li)
      ^
/tmp/skupper-rpms/skupper-router/src/server.c:1661:6: note: code may be misoptimized unless -fno-strict-aliasing is used
/tmp/skupper-rpms/skupper-router/src/router_core/router_core_private.h:889:6: warning: type of 'qdr_action_enqueue' does not match original declaration [-Wlto-type-mismatch]
 void qdr_action_enqueue(qdr_core_t *core, qdr_action_t *action);
      ^
/tmp/skupper-rpms/skupper-router/src/router_core/router_core.c:441:6: note: 'qdr_action_enqueue' was previously declared here
 void qdr_action_enqueue(qdr_core_t *core, qdr_action_t *action)
      ^
/tmp/skupper-rpms/skupper-router/src/router_core/router_core.c:441:6: note: code may be misoptimized unless -fno-strict-aliasing is used
gmake[2]: Leaving directory '/tmp/skupper-rpms/skupper-router/x86_64-redhat-linux-gnu'
jiridanek commented 2 years ago

https://github.com/skupperproject/skupper-router/runs/6059671893?check_suite_focus=true#step:6:1117

jiridanek commented 2 years ago

This warning appears on CentOS 8, but not on Fedora 36. Only the c_unittests binary is affected.

Looks like tied to gcc version. Here is failure with gcc-8 that goes away with gcc-11, https://github.com/FreeRDP/FreeRDP/issues/5358