libosmocore/include
Pau Espin ad9757a3b1 sockaddr_str: Introduce macro OSMO_SOCKADDR_STR_FMT_ARGS_NOT_NULL
Under certain cases, gcc version 13.1.1 20230714 catches the fact that
the pointer being passed cannot be null, (eg local variable struct
osmo_sockaddr_str addr_str passed as &addr_str), and errors about
checking nullability of a pointer which cannot be null.

"""
/include/osmocom/core/sockaddr_str.h:63:10: error: the address of 'addr_str' will always evaluate as 'true' [-Werror=address]
   63 |         ((R) && (R)->af == AF_INET6)? "[" : "", \
      |          ^
"""

Let's add a macro which can be used for pointers known to be there (tbh,
I'd expect that to be the usual case in most code paths). Using this new
macro should be more optimal in those cases, and avoid gcc erroring.

Change-Id: I59c7b05450cb463d2e87ddb022f0b6ba7109d398
2023-08-01 19:03:49 +02:00
..
osmocom sockaddr_str: Introduce macro OSMO_SOCKADDR_STR_FMT_ARGS_NOT_NULL 2023-08-01 19:03:49 +02:00
Makefile.am Split include/Makefile.am content into subdirs 2023-01-18 18:29:34 +01:00