| Message ID | 20191110100323.13206-1-a@unstable.cc |
|---|---|
| State | Accepted |
| Headers |
Return-Path: <openvpn-devel-bounces@lists.sourceforge.net> Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director7.mail.ord1d.rsapps.net ([172.31.255.6]) by backend30.mail.ord1d.rsapps.net with LMTP id oEViA9rgx13VNgAAIUCqbw for <patchwork@openvpn.net>; Sun, 10 Nov 2019 05:05:14 -0500 Received: from proxy3.mail.iad3b.rsapps.net ([172.31.255.6]) by director7.mail.ord1d.rsapps.net with LMTP id yI3WANrgx12KbgAAovjBpQ ; Sun, 10 Nov 2019 05:05:14 -0500 Received: from smtp32.gate.iad3b ([172.31.255.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy3.mail.iad3b.rsapps.net with LMTP id wIepNtngx13KJwAAM8Wetg ; Sun, 10 Nov 2019 05:05:13 -0500 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp32.gate.iad3b.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dmarc=none (p=nil; dis=none) header.from=unstable.cc X-Suspicious-Flag: YES X-Classification-ID: 960aa2f4-03a1-11ea-b300-5254006a2e70-1-1 Received: from [216.105.38.7] ([216.105.38.7:40782] helo=lists.sourceforge.net) by smtp32.gate.iad3b.rsapps.net (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 0B/B5-28329-9D0E7CD5; Sun, 10 Nov 2019 05:05:13 -0500 Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) id 1iTk4c-0007HM-Mh; Sun, 10 Nov 2019 10:03:58 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from <a@unstable.cc>) id 1iTk4b-0007HE-Id for openvpn-devel@lists.sourceforge.net; Sun, 10 Nov 2019 10:03:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=iTDobpHsmHBHQ4Q38CK8OgUfIcA+GbKamdLoz4QMW2k=; b=TY1JuDpbXwkEtzLsRaAHAuFsXh f0pdL6oR6hS8WcHbC5Tx0QHGKoImjG13uz/eMVDbzyFkB65AbuFB5alFf0P/sF5YXSP+4f/klJ5fL 0H731iHt3Z16hJzz7EWzrkZ0qSRvmRaG8wLUtBo8mDQ5uOYyGP3nOpiDwEoRc8ijyLgk=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From :Sender:Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=iTDobpHsmHBHQ4Q38CK8OgUfIcA+GbKamdLoz4QMW2k=; b=I DuPG/moDBx9ZQsj0uIcbKr0tfwz4bWP0Vy+JC+ZaD+9Nes2vIr2GC8toPRNShznOw7o1nTVF1iGw4 Wxj55Me6JELLzAvA6Ho4tMlox2zbd/2z6zNO2KpAoSzGDLLXzmR6zQa+JrDdLUNBWdV4SuEuOQ8/V D+IdzfPa59Oc+xqU=; Received: from s2.neomailbox.net ([5.148.176.60]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1iTk4Y-00ANds-E7 for openvpn-devel@lists.sourceforge.net; Sun, 10 Nov 2019 10:03:57 +0000 From: Antonio Quartulli <a@unstable.cc> To: openvpn-devel@lists.sourceforge.net Date: Sun, 10 Nov 2019 11:03:23 +0100 Message-Id: <20191110100323.13206-1-a@unstable.cc> MIME-Version: 1.0 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [5.148.176.60 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1iTk4Y-00ANds-E7 Subject: [Openvpn-devel] [PATCH] add -Wno-stringop-truncation to CFLAGS on linux X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: <openvpn-devel.lists.sourceforge.net> List-Unsubscribe: <https://lists.sourceforge.net/lists/options/openvpn-devel>, <mailto:openvpn-devel-request@lists.sourceforge.net?subject=unsubscribe> List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=openvpn-devel> List-Post: <mailto:openvpn-devel@lists.sourceforge.net> List-Help: <mailto:openvpn-devel-request@lists.sourceforge.net?subject=help> List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/openvpn-devel>, <mailto:openvpn-devel-request@lists.sourceforge.net?subject=subscribe> Cc: Antonio Quartulli <a@unstable.cc> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox |
| Series |
[Openvpn-devel] add -Wno-stringop-truncation to CFLAGS on linux
|
|
Commit Message
Antonio Quartulli
Nov. 9, 2019, 11:03 p.m. UTC
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>
---
configure.ac | 1 +
1 file changed, 1 insertion(+)
Comments
Acked-by: Gert Doering <gert@greenie.muc.de> While I'm not exactly happy suppressing warnings, this particular one is somewhat of an annoyance - the two cases where we cause warnings today are perfectly fine, and working around spurious compiler warnings is not what I want to spend our time on. We can revisit this later. Your patch has been applied to the master branch. commit 46d096074fd74e0d6c1d4756429215d22f2b3441 Author: Antonio Quartulli Date: Sun Nov 10 11:03:23 2019 +0100 add -Wno-stringop-truncation to CFLAGS on linux 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> -- kind regards, Gert Doering
diff --git a/configure.ac b/configure.ac index 4159e450..807804e5 100644 --- a/configure.ac +++ b/configure.ac @@ -1283,6 +1283,7 @@ AC_DEFUN([ACL_CHECK_ADD_COMPILE_FLAGS], [ [AC_MSG_RESULT([no]); CFLAGS="$old_cflags"])] ) +ACL_CHECK_ADD_COMPILE_FLAGS([-Wno-stringop-truncation]) ACL_CHECK_ADD_COMPILE_FLAGS([-Wno-unused-function]) ACL_CHECK_ADD_COMPILE_FLAGS([-Wno-unused-parameter]) ACL_CHECK_ADD_COMPILE_FLAGS([-Wall])