signalwire / freeswitch

FreeSWITCH is a Software Defined Telecom Stack enabling the digital transformation from proprietary telecom switches to a versatile software implementation that runs on any commodity hardware. From a Raspberry PI to a multi-core server, FreeSWITCH can unlock the telecommunications potential of any device.
https://freeswitch.com/#getting-started
Other
3.32k stars 1.38k forks source link

Compiler failure in mod_xml_rpc.c (missing const) #2495

Open dilyanpalauzov opened 1 week ago

dilyanpalauzov commented 1 week ago

With gcc (GCC) 14.1.1 20240607, compiling freeswitch at commit 40a33e7bb7f64fbfdc5831e fails:

making all mod_xml_rpc
make[4]: Entering directory '/git/voip/freeswitch/src/mod/xml_int/mod_xml_rpc'
  CC       mod_xml_rpc_la-mod_xml_rpc.lo
mod_xml_rpc.c: In function 'is_authorized':
mod_xml_rpc.c:362:67: error: passing argument 6 of 'user_attributes' from incompatible pointer type [-Wincompatible-pointer-types]
  362 |         if (!user_attributes(user, domain_name, NULL, NULL, NULL, &allowed_commands)) {
      |                                                                   ^~~~~~~~~~~~~~~~~
      |                                                                   |
      |                                                                   char **
mod_xml_rpc.c:249:148: note: expected 'const char **' but argument is of type 'char **'
  249 |                                                                   const char **ppasswd, const char **pvm_passwd, const char **palias, const char **pallowed_commands)
      |                                                                                                                                       ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
mod_xml_rpc.c: In function 'handler_hook':
mod_xml_rpc.c:947:86: error: passing argument 5 of 'ConnRead' from incompatible pointer type [-Wincompatible-pointer-types]
  947 |                                                 ConnRead(r->connP, 2000, NULL, NULL, &readError);
      |                                                                                      ^~~~~~~~~~
      |                                                                                      |
      |                                                                                      char **
In file included from /git/voip/freeswitch/libs/xmlrpc-c/include/../lib/abyss/src/http.h:7,
                 from mod_xml_rpc.c:70:
/git/voip/freeswitch/libs/xmlrpc-c/include/../lib/abyss/src/conn.h:98:30: note: expected 'const char ** const' but argument is of type 'char **'
   98 |          const char ** const errorP);
      |          ~~~~~~~~~~~~~~~~~~~~^~~~~~
make[4]: *** [Makefile:1291: mod_xml_rpc_la-mod_xml_rpc.lo] Error 1
make[4]: Leaving directory '/git/voip/freeswitch/src/mod/xml_int/mod_xml_rpc'
make[3]: *** [Makefile:731: mod_xml_rpc-all] Error 1