fix gcc maybe-uninitialized compiler warnings in acl_addr
authorLee <ler762@users.sourceforge.net>
Wed, 9 Aug 2023 08:42:15 +0000 (04:42 -0400)
committerLee <ler762@users.sourceforge.net>
Wed, 9 Aug 2023 08:42:15 +0000 (04:42 -0400)
commitcda2a29c853e17c9ac714d17ac2f31434cb5d2f8
tree1b7e57647fc6236d02a75c7f6b1190a63005eb89
parentb1fbecac2b4058d2a3db3c889ff75012940bef8f
fix gcc maybe-uninitialized compiler warnings in acl_addr

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 ‘acl_addr’:
filters.c:465:31: warning: ‘addr_len’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  465 |    for (i = 0; (i < addr_len) && masklength; i++)
      |                ~~~~~~~~~~~~~~~^~~~~~~~~~~~~
filters.c:454:18: warning: ‘mask_port’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  454 |       *mask_port = 1;
      |       ~~~~~~~~~~~^~~
filters.c:479:19: warning: ‘mask_data’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  479 |          mask_data[i] = (uint8_t)~((1 << (8 - masklength)) - 1);
      |                   ^
filters.c