]> git.ipfire.org Git - thirdparty/pdns.git/commit
dnsdist: Prevent a false-positive warning from the compiler
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 1 Mar 2023 10:34:02 +0000 (11:34 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 23 Jan 2024 11:54:12 +0000 (12:54 +0100)
commitd7a4f1fd253facecdd529d255fec713da2bd3bd3
tree49c3cac0bbbbdf0c9839302941e43fff724ff026
parentbbb193ae199b7ab472311626266a443b8fc53925
dnsdist: Prevent a false-positive warning from the compiler

```
In file included from xsk.hh:50,
                 from xsk.cc:23:
In function ‘xdp_desc* xsk_ring_prod__tx_desc(xsk_ring_prod*, __u32)’,
    inlined from ‘void XskSocket::send(std::vector<std::unique_ptr<XskPacket>, std::allocator<std::unique_ptr<XskPacket> > >&)’ at xsk.cc:176:28:
/usr/include/xdp/xsk.h:76:27: warning: ‘idx’ may be used uninitialized [-Wmaybe-uninitialized]
   76 |         return &descs[idx & tx->mask];
      |                       ~~~~^~~~~~~~~~
```
pdns/xsk.cc