]> git.ipfire.org Git - thirdparty/openvpn.git/commit
add -Wno-stringop-truncation to CFLAGS on linux
authorAntonio Quartulli <a@unstable.cc>
Sun, 10 Nov 2019 10:03:23 +0000 (11:03 +0100)
committerGert Doering <gert@greenie.muc.de>
Sun, 10 Nov 2019 10:47:23 +0000 (11:47 +0100)
commit46d096074fd74e0d6c1d4756429215d22f2b3441
treed5d2d175c071ab260ded343cbe6b018c2c127151
parentb8b3f1177e48678e3bbe955634fe412d5515fab0
add -Wno-stringop-truncation to CFLAGS on linux

GCC>=8 supports truncation checking, however the logic is somewhat
fragile when it comes to evaluating strncpy().

In buffer.h we have implemented a wrapper called strncpynt() which
ensures we always do the right hting in the code and reduce the chance
of having bugs.

This said, it seems that the gcc logic is not able to always understand
if we are doing the right thing and throws a false positive.

Toa void the noise, disable truncation checking on Linux by default.

Signed-off-by: Antonio Quartulli <a@unstable.cc>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20191110100323.13206-1-a@unstable.cc>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg19085.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
configure.ac