[OpenSIPS-Devel] [OpenSIPS/opensips] df0ca0: Make identation consistent to not upset Clang 10:

Maksym Sobolyev noreply at github.com
Fri Mar 24 00:55:08 UTC 2023


  Branch: refs/heads/3.1
  Home:   https://github.com/OpenSIPS/opensips
  Commit: df0ca08f81af9b384ae879f8d3184d78c4aa7021
      https://github.com/OpenSIPS/opensips/commit/df0ca08f81af9b384ae879f8d3184d78c4aa7021
  Author: Maksym Sobolyev <sobomax at sippysoft.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M parser/parse_privacy.c

  Log Message:
  -----------
  Make identation consistent to not upset Clang 10:

parser/parse_privacy.c:161:2: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]


  Commit: 74142030bd67dca9c893ba6a3439c58f9add23ff
      https://github.com/OpenSIPS/opensips/commit/74142030bd67dca9c893ba6a3439c58f9add23ff
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M modules/ldap/iniparser.c

  Log Message:
  -----------
  ldap: Fix possible buffer overflow

If gcc says "2050 chars can overflow a 2049 buffer", gcc is definitely
not wrong...


  Commit: 9921c38d89af9e4562de5fd442ac5943123eb98d
      https://github.com/OpenSIPS/opensips/commit/9921c38d89af9e4562de5fd442ac5943123eb98d
  Author: Maksym Sobolyev <sobomax at sippysoft.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M modules/dialog/dlg_replication.c

  Log Message:
  -----------
  Fix unitialized use in some case:

dlg_replication.c:157:2: error: variable 'd_entry' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
        DLG_BIN_POP(int, packet, state, pre_linking_error);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dlg_replication.c:74:7: note: expanded from macro 'DLG_BIN_POP'
                if (bin_pop_ ## _type(_p, (str *)&_field) != 0) { \
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<scratch space>:69:1: note: expanded from here
bin_pop_int
^
dlg_replication.c:351:22: note: uninitialized use occurs here
        dlg_unlock(d_table, d_entry);


  Commit: 1bf7abf617abc57d3c66c634f4ccef0b25ea5c8c
      https://github.com/OpenSIPS/opensips/commit/1bf7abf617abc57d3c66c634f4ccef0b25ea5c8c
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M modules/ldap/iniparser.c

  Log Message:
  -----------
  ldap: fix copying value in smaller buffers


  Commit: efd0d365c3c7dad5bc0b1f99bee9bf7b44119376
      https://github.com/OpenSIPS/opensips/commit/efd0d365c3c7dad5bc0b1f99bee9bf7b44119376
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M modules/ldap/iniparser.c

  Log Message:
  -----------
  ldap: prevent possible buffer overflow

Fixes Coverity CID #40879


  Commit: 9c6ddf09737fd7946b5bf46d1532167d69c05254
      https://github.com/OpenSIPS/opensips/commit/9c6ddf09737fd7946b5bf46d1532167d69c05254
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M modules/nathelper/sip_pinger.h

  Log Message:
  -----------
  nathelper: prevent memory overwritten during pinging


  Commit: 66ff76c3ed743e9237f90690c1b13649027df8c3
      https://github.com/OpenSIPS/opensips/commit/66ff76c3ed743e9237f90690c1b13649027df8c3
  Author: Maksym Sobolyev <sobomax at sippysoft.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M modules/b2b_logic/b2b_logic.c

  Log Message:
  -----------
  Fix logic error picked up by Cang 10:

b2b_logic.c:1789:14: error: overlapping comparisons always evaluate to false [-Werror,-Wtautological-overlap-compare]


  Commit: 05a52ed356871a78c4847241273084f0424f3dab
      https://github.com/OpenSIPS/opensips/commit/05a52ed356871a78c4847241273084f0424f3dab
  Author: Maksym Sobolyev <sobomax at sippysoft.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M modules/avpops/avpops_impl.c
    M modules/b2b_sca/sca_records.c
    M modules/proto_ws/ws_handshake_common.h

  Log Message:
  -----------
  GC variables that is set but never used. This breaks builds with
latest clang.


  Commit: cf5bf6f7c69df76bb1ba7173520ba6041de5ae39
      https://github.com/OpenSIPS/opensips/commit/cf5bf6f7c69df76bb1ba7173520ba6041de5ae39
  Author: Maksym Sobolyev <sobomax at sippysoft.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M modules/carrierroute/route_func.c
    M modules/drouting/dr_cb.c

  Log Message:
  -----------
  Cast void * to int first before we can it to enum. This is
to fix the build on clang-11.


  Commit: 0cd6fa09e01c2f1c5901fec38b9fa69b9a2a0767
      https://github.com/OpenSIPS/opensips/commit/0cd6fa09e01c2f1c5901fec38b9fa69b9a2a0767
  Author: Maksym Sobolyev <sobomax at sippysoft.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    A lib/modules.mk/perl.mk
    M modules/db_perlvdb/Makefile
    M modules/perl/Makefile

  Log Message:
  -----------
  o Set -Wno-compound-token-split-by-macro needed to get things
  building up with clang > 11.

o Unify common code in the perl modules to fix db_perlvdb
  as well with clang > 11.


  Commit: b1dc064a03c37950be7a76016280b7a93dec1934
      https://github.com/OpenSIPS/opensips/commit/b1dc064a03c37950be7a76016280b7a93dec1934
  Author: Maksym Sobolyev <sobomax at sippysoft.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M modules/b2b_logic/b2b_load.h
    M modules/b2b_logic/b2b_logic.c
    M modules/b2b_logic/b2b_logic.h

  Log Message:
  -----------
  Make b2bl_bridge_extern() and internal_init_scenario()
implementationis match prototype.


  Commit: 37164f5021e05d265a48989ca963f898f131439d
      https://github.com/OpenSIPS/opensips/commit/37164f5021e05d265a48989ca963f898f131439d
  Author: Maksym Sobolyev <sobomax at sippysoft.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M mi/mi_trace.c

  Log Message:
  -----------
  Fix logical condition that would otherwise always be "false".

Reported by:	gcc-12


  Commit: 815e5d5127e062e5a02ca1d5a30b3d68f2133795
      https://github.com/OpenSIPS/opensips/commit/815e5d5127e062e5a02ca1d5a30b3d68f2133795
  Author: Ovidiu Sas <osas at voipembedded.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M modules/cachedb_sql/cachedb_sql.c
    M modules/msilo/msilo.c

  Log Message:
  -----------
  cachedb_sql: fix warning: this `if` clause does not guard... [-Wmisleading-indentation]

msilo: fix warning: this `else` clause does not guard... [-Wmisleading-indentation]


  Commit: e4238cf08e34681e9cc73acfb0d5566a6f3e204e
      https://github.com/OpenSIPS/opensips/commit/e4238cf08e34681e9cc73acfb0d5566a6f3e204e
  Author: Maksym Sobolyev <sobomax at sippysoft.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M modules/mi_html/http_fnc.c

  Log Message:
  -----------
  Fix Clang 9 warning:

  http_fnc.c:679:22: error: adding 'int' to a string does not append to the string


  Commit: 4d81a402a701d3a69f8b723f561a970191eb43c1
      https://github.com/OpenSIPS/opensips/commit/4d81a402a701d3a69f8b723f561a970191eb43c1
  Author: Maksym Sobolyev <sobomax at sippysoft.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M modules/drouting/drouting.c
    M modules/qrouting/qr_sort.c
    M resolve.c

  Log Message:
  -----------
  Fix warning converting from int to float with Clang 10, i.e:

resolve.c:1454:34: error: implicit conversion from 'int' to 'float' changes value from 2147483647 to 2147483648 [-Werror,-Wimplicit-int-float-conversion]


  Commit: 9998a33f02bea2eef6f239d6ca0e9b9474d3bc17
      https://github.com/OpenSIPS/opensips/commit/9998a33f02bea2eef6f239d6ca0e9b9474d3bc17
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M modules/jabber/xjab_wlist.c

  Log Message:
  -----------
  jabber: Fix off-by-one strncpy() error

warning: ‘__builtin_strncpy’ output truncated before terminating nul
copying as many bytes from a string as its length [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bo...
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
xjab_wlist.c: In function ‘xj_wlist_set_aliases’:
xjab_wlist.c:455:34: note: length computed here
  455 |   i = jwl->aliases->proxy->len = strlen(pa);
      |                                  ^~~~~~~~~~


  Commit: 1f70da1b28fa9c1010e100f3696d2f5291a9bde3
      https://github.com/OpenSIPS/opensips/commit/1f70da1b28fa9c1010e100f3696d2f5291a9bde3
  Author: Maksym Sobolyev <sobomax at sippysoft.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M modules/jabber/xjab_wlist.c

  Log Message:
  -----------
  Make identation match compiler behaviour. This fixes build with
gcc-11.


  Commit: 42160008c1a995d93d781e064d6bd25fdab696f8
      https://github.com/OpenSIPS/opensips/commit/42160008c1a995d93d781e064d6bd25fdab696f8
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M modules/tracer/tracer.c

  Log Message:
  -----------
  tracer: replace un-necessary strncpy with memcpy


  Commit: c15fe1e45581bfc5c8353f068cc2c5d923997d4e
      https://github.com/OpenSIPS/opensips/commit/c15fe1e45581bfc5c8353f068cc2c5d923997d4e
  Author: Maksym Sobolyev <sobomax at sippysoft.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M modules/statistics/statistics.c

  Log Message:
  -----------
  Remove bogus __attribute__((unused)), make sure grp_idx is always initialized.


  Commit: 51d176acafca220697b257c855767fd0bc92a343
      https://github.com/OpenSIPS/opensips/commit/51d176acafca220697b257c855767fd0bc92a343
  Author: Maksym Sobolyev <sobomax at sippysoft.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M modules/proto_bin/proto_bin.c
    M modules/proto_hep/proto_hep.c

  Log Message:
  -----------
  GC unused variable.


  Commit: 1338cd2d4822f8aafb4fd65f9187c486d283bda1
      https://github.com/OpenSIPS/opensips/commit/1338cd2d4822f8aafb4fd65f9187c486d283bda1
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M modules/python/python_mod.c

  Log Message:
  -----------
  python: remove deprecated PyEval_InitThreads call since python v3.7


  Commit: 1ead9e9a5dd9d2845df5dcbeb971f977cd036b69
      https://github.com/OpenSIPS/opensips/commit/1ead9e9a5dd9d2845df5dcbeb971f977cd036b69
  Author: Maksym Sobolyev <sobomax at sippysoft.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M modules/snmpstats/Makefile

  Log Message:
  -----------
  Filter out -ffat-lto-objects option not supported on clang.


  Commit: 4537c208c8525ded8651bd31bbba687ed2be6279
      https://github.com/OpenSIPS/opensips/commit/4537c208c8525ded8651bd31bbba687ed2be6279
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M modules/freeswitch/esl/src/include/esl.h

  Log Message:
  -----------
  freeswitch: fix string maipulation warnings in esl

(cherry picked from commit 7bc88e2d029e664149609b093bba3d9bc76fce79)


  Commit: 6389c3602dc5dbfcf4400caf233c7308a74093bf
      https://github.com/OpenSIPS/opensips/commit/6389c3602dc5dbfcf4400caf233c7308a74093bf
  Author: Maksym Sobolyev <sobomax at sippysoft.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M modules/db_perlvdb/perlvdb_conv.c

  Log Message:
  -----------
  Remove comparison that is always "true".

Reported by:    gcc-12


  Commit: 24223965930bddfc4d777f2c20373cca9c2986ff
      https://github.com/OpenSIPS/opensips/commit/24223965930bddfc4d777f2c20373cca9c2986ff
  Author: Maksym Sobolyev <sobomax at sippysoft.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M modules/lua/sipmemcache.c

  Log Message:
  -----------
  Don't pass unsigned short * into a function that expects
unsigned int *. This fixes the following error building with
gcc on ubuntu-22:

sipmemcache.c: In function `l_sipmemcache_server_add`:
../../ut.h:685:13: error: array subscript `unsigned int[0]` is partly outside array bounds of `in_port_t[1]` {aka `short unsigned int[1]`} [-Werror=array-bounds]
  685 |         *_r = 0;
      |         ~~~~^~~
sipmemcache.c:72:13: note: while referencing `iport`
   72 |   in_port_t iport = 0;
      |             ^~~~~


  Commit: de4432ab74bc9ee74eaddec7c6f4148981a4cfb7
      https://github.com/OpenSIPS/opensips/commit/de4432ab74bc9ee74eaddec7c6f4148981a4cfb7
  Author: Maksym Sobolyev <sobomax at sippysoft.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    A Makefile.openssl
    M modules/identity/Makefile
    M modules/osp/Makefile
    M modules/proto_tls/Makefile
    M modules/proto_wss/Makefile
    M modules/tls_mgm/Makefile

  Log Message:
  -----------
  Move the same openssl make-foo code that has been copied and
pasted around into a central location and include it from
there.


  Commit: 11164c3af030f7a04ff9eeceb1b562f090cc38cc
      https://github.com/OpenSIPS/opensips/commit/11164c3af030f7a04ff9eeceb1b562f090cc38cc
  Author: Maksym Sobolyev <sobomax at sippysoft.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M modules/mmgeoip/geoip2.c

  Log Message:
  -----------
  Make geoip2_get_field() function declaration match prototype.


  Commit: 06ab1d88f5ee4d312ed90307681411f93d3515d6
      https://github.com/OpenSIPS/opensips/commit/06ab1d88f5ee4d312ed90307681411f93d3515d6
  Author: Maksym Sobolyev <sobomax at sippysoft.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M modules/pi_http/http_fnc.c

  Log Message:
  -----------
  Add missing {} as reported by the gcc-11.


  Commit: 33f4ae5f273a4502df9c9c3d9fde9c9104b9b06b
      https://github.com/OpenSIPS/opensips/commit/33f4ae5f273a4502df9c9c3d9fde9c9104b9b06b
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M modules/uac_auth/auth.c

  Log Message:
  -----------
  uac_auth: fix gcc uninitialized warning


  Commit: 9edb5e8ba2debde38fb47f57d977875645d15f76
      https://github.com/OpenSIPS/opensips/commit/9edb5e8ba2debde38fb47f57d977875645d15f76
  Author: Maksym Sobolyev <sobomax at sippysoft.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M pvar.c

  Log Message:
  -----------
  GC unused variable.


  Commit: ad4767c340ec4ce139a24b8681b69928344ca054
      https://github.com/OpenSIPS/opensips/commit/ad4767c340ec4ce139a24b8681b69928344ca054
  Author: Maksym Sobolyev <sobomax at sippysoft.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M md5.c
    M md5.h
    M md5global.h
    M md5utils.c
    M modules/auth/nonce.c
    M modules/proto_smpp/smpp.c
    M modules/sip_i/sip_i.c
    M strcommon.c
    M ut.h

  Log Message:
  -----------
  Fix build with clang 15: get rid of the 30-year old PROTO_LIST
hack to deal with some prehistoric compilers. Switch public
API to use char *, not unsigned char *, which is kinda pointless.
Also make arguments const where appropriate.


  Commit: 567ebaf1da79fe08dc70ac41156409b35d475b51
      https://github.com/OpenSIPS/opensips/commit/567ebaf1da79fe08dc70ac41156409b35d475b51
  Author: Maksym Sobolyev <sobomax at sippysoft.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M modules/cachedb_local/hash.h

  Log Message:
  -----------
  Fix prototype for lcache_htable_destroy() to match implementation.


  Commit: 88031b0d2ff20dfbcb3e6679e43f1a8d0eb411fc
      https://github.com/OpenSIPS/opensips/commit/88031b0d2ff20dfbcb3e6679e43f1a8d0eb411fc
  Author: Maksym Sobolyev <sobomax at sippysoft.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M modules/call_center/cc_db.c
    M modules/ldap/iniparser.c

  Log Message:
  -----------
  clang 15 fix: get rid of variable that is set but not used.


  Commit: 7f59fbed8b52127379aa2d74b6067c9bc9ab55ec
      https://github.com/OpenSIPS/opensips/commit/7f59fbed8b52127379aa2d74b6067c9bc9ab55ec
  Author: Maksym Sobolyev <sobomax at sippysoft.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M db/db.c
    M modules/dialplan/dp_db.h

  Log Message:
  -----------
  clang15 fix: define function prototype properly.


  Commit: 33377365d254ea22c90e4a321d62ac2dcf791366
      https://github.com/OpenSIPS/opensips/commit/33377365d254ea22c90e4a321d62ac2dcf791366
  Author: Maksym Sobolyev <sobomax at sippysoft.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M modules/pi_http/pi_http.c

  Log Message:
  -----------
  clang-15 fix: make child_init() prototype match actual function.


  Commit: 08a489ee65de2879bbecb9210a9b1a74887751c6
      https://github.com/OpenSIPS/opensips/commit/08a489ee65de2879bbecb9210a9b1a74887751c6
  Author: Maksym Sobolyev <sobomax at sippysoft.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    A .github/workflows/main.yml
    M .travis.yml
    A scripts/build/build.conf.sub
    A scripts/build/do_build.sh
    A scripts/build/install_depends.sh
    A scripts/build/linkstatic.sh

  Log Message:
  -----------
  Enable GH Actions.


Compare: https://github.com/OpenSIPS/opensips/compare/4097ca527223...08a489ee65de



More information about the Devel mailing list