]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: fix build error 14776/head
authorIgor Ryzhov <iryzhov@nfware.com>
Sun, 12 Nov 2023 00:57:25 +0000 (02:57 +0200)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Sun, 12 Nov 2023 09:08:05 +0000 (09:08 +0000)
commit958d75a22147a51c878798e55537fb532cb0de77
treecb50bf355a9da32cbae55be6f4a428d420eaae6f
parenta3b215a82bf79e6f87842b2b8235acdb847cadc2
bgpd: fix build error

I recieve the following error with GCC 9.4.0:
```
In file included from /usr/include/string.h:495,
                 from ./lib/zebra.h:23,
                 from bgpd/bgp_snmp_bgp4v2.c:7:
In function ‘memset’,
    inlined from ‘bgp4v2PathAttrLookup’ at bgpd/bgp_snmp_bgp4v2.c:605:3,
    inlined from ‘bgp4v2PathAttrTable’ at bgpd/bgp_snmp_bgp4v2.c:747:9:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:71:10: error: ‘__builtin_memset’ offset [9, 20] from the object at ‘paddr’ is out of the bounds of referenced subobject ‘_v4_addr’ with type ‘struct in_addr’ at offset 4 [-Werror=array-bounds]
   71 |   return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
(cherry picked from commit 6eb79dd6f20d54edff7e55eff9c6fda4c1711111)
bgpd/bgp_snmp_bgp4v2.c