fix gcc maybe-uninitialized compiler warnings in match_sockaddr
authorLee <ler762@users.sourceforge.net>
Wed, 9 Aug 2023 08:34:55 +0000 (04:34 -0400)
committerLee <ler762@users.sourceforge.net>
Wed, 9 Aug 2023 08:34:55 +0000 (04:34 -0400)
commitb1fbecac2b4058d2a3db3c889ff75012940bef8f
tree255148bf4d1462e64c8954b1aae9d1b5fff4262f
parenta87d1d6abe304fccb8d8fd940430d85a432a3b59
fix gcc maybe-uninitialized compiler warnings in match_sockaddr

I can't tell if they're false positives or not, but compiling with
no warnings is better than seeing this:

filters.c: In function ‘match_sockaddr’:
filters.c:205:42: warning: ‘address_port’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  205 |    if (*netmask_port && *network_port != *address_port)
      |                                          ^~~~~~~~~~~~~
filters.c:214:24: warning: ‘address_addr’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  214 |           (address_addr[i] & netmask_addr[i]))
      |            ~~~~~~~~~~~~^~~
filters.c:205:8: warning: ‘netmask_port’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  205 |    if (*netmask_port && *network_port != *address_port)
      |        ^~~~~~~~~~~~~
filters.c:200:20: warning: ‘netmask_addr’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  200 |       netmask_addr += 12;
      |                    ^~
filters.c:205:25: warning: ‘network_port’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  205 |    if (*netmask_port && *network_port != *address_port)
      |                         ^~~~~~~~~~~~~
filters.c:172:17: warning: ‘addr_len’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  172 |    unsigned int addr_len;
      |                 ^~~~~~~~
filters.c