We suppress 4 instances like:
udp.c:113:45: error: increment of a boolean expression [-Werror=bool-operation]
113 | if (us->experienced[!!dest][af][success]++)
| ^~
This is a very convenient idiom (using the saturating property of
boolean addition) and there is no sensible replacement.
And we suppress 6 instances like:
tun.c:322:6: error: 'strncpy' specified bound 16 equals destination size [-Werror=stringop-truncation]
322 | strncpy(ifr.ifr_name,st->interface_name,IFNAMSIZ);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All write to ifr_name. strncpy is precisely right for this, since the
API supports non-null-terminated names of length IFNAMSIZ. That is
why I used strncpy.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-Wmissing-declarations -Wnested-externs -Wredundant-decls \
-Wpointer-arith -Wformat=2 -Winit-self \
-Wswitch-enum -Wunused-variable -Wunused-function -Wbad-function-cast \
- -Wno-strict-aliasing -fno-strict-aliasing
+ -Wno-strict-aliasing -fno-strict-aliasing \
+ -Wno-bool-operation -Wno-stringop-truncation