We don't modify this structure at all. For some reason cppcheck doesn't catch this with our current options, but did when I was experimenting with some different options. Signed-off-by: David Gibson <david(a)gibson.dropbear.id.au> --- ndp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ndp.c b/ndp.c index a1ee834..faae408 100644 --- a/ndp.c +++ b/ndp.c @@ -234,8 +234,8 @@ int ndp(struct ctx *c, const struct icmp6hdr *ih, const struct in6_addr *saddr, return 1; if (ih->icmp6_type == NS) { - struct ndp_ns *ns = packet_get(p, 0, 0, sizeof(struct ndp_ns), - NULL); + const struct ndp_ns *ns = + packet_get(p, 0, 0, sizeof(struct ndp_ns), NULL); if (!ns) return -1; -- 2.47.0