From patchwork Sun Nov 10 08:56:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 907 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director7.mail.ord1d.rsapps.net ([172.27.255.54]) by backend30.mail.ord1d.rsapps.net with LMTP id oKahHMhryF06cQAAIUCqbw for ; Sun, 10 Nov 2019 14:58:00 -0500 Received: from proxy7.mail.iad3a.rsapps.net ([172.27.255.54]) by director7.mail.ord1d.rsapps.net with LMTP id GERSGshryF1KcAAAovjBpQ ; Sun, 10 Nov 2019 14:58:00 -0500 Received: from smtp10.gate.iad3a ([172.27.255.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy7.mail.iad3a.rsapps.net with LMTP id KLL8FMhryF0SUQAAnPvY+A ; Sun, 10 Nov 2019 14:58:00 -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: smtp10.gate.iad3a.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: 6535f5fe-03f4-11ea-8c98-525400a8203f-1-1 Received: from [216.105.38.7] ([216.105.38.7:53910] helo=lists.sourceforge.net) by smtp10.gate.iad3a.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 4A/B8-06871-7CB68CD5; Sun, 10 Nov 2019 14:58:00 -0500 Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1iTtKW-00019o-Ds; Sun, 10 Nov 2019 19:57:00 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1iTtKV-00019c-CU for openvpn-devel@lists.sourceforge.net; Sun, 10 Nov 2019 19:56:59 +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=u0emzNkq3/7meb95i2/wb1Ng7VL0X2gLObxhWUFnbcE=; b=Ho1l/x7ETx2gurkcOAgK7HGQfH Cr+eRzlrE+jVFZhMv/gavmsN31SBUnxNCYBRtb3/otd1uJE8A5+v/ZY5KcnLTWoz/MIXY004YcS+N bPEgxpEDNeoTylfVfFduyiJrNU5r6VpGbECR+LfmcEelP6wAvusaFlDG5yX0pzvTyfpc=; 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=u0emzNkq3/7meb95i2/wb1Ng7VL0X2gLObxhWUFnbcE=; b=e UR1uI+TdQmjrB06eXiTtRAX4KhBcKAIZT/0ldXy9R1JMvmH2u3wH/FmcxRGxH8s9BSVoyyC5ZfvwS uz2n0QGkU58Qt+S74HD2Y/+0YXrGfzFLD7Bcww4Duz44NxQsdc2fhfpPG4n+jRtWXE2DTXJ+B323Q mhC3H/Ytr+fih2OQ=; Received: from [5.148.176.60] (helo=s2.neomailbox.net) by sfi-mx-4.v28.lw.sourceforge.com with esmtps (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1iTtKS-00B5Ku-Vr for openvpn-devel@lists.sourceforge.net; Sun, 10 Nov 2019 19:56:59 +0000 From: Antonio Quartulli To: openvpn-devel@lists.sourceforge.net Date: Sun, 10 Nov 2019 20:56:22 +0100 Message-Id: <20191110195622.28177-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_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 1.0 RDNS_NONE Delivered to internal network by a host with no rDNS -0.4 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1iTtKS-00B5Ku-Vr Subject: [Openvpn-devel] [PATCH] travis: fix CFLAGS assignment error and add -Werror only when compiling on Linux for Linux X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Antonio Quartulli Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox CFLAGS may not resolve to anything and the build-check.sh script would just fail. Use proper substitution so that the script won't error out when CFLAGS is uninitialized. At the same time ensure that such flag is set only when compiling *for* linux (we use linux to also compile *for* windows) Signed-off-by: Antonio Quartulli --- Test on travis-ci with my personal openvpn repo: https://travis-ci.org/ordex/openvpn .travis/build-check.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis/build-check.sh b/.travis/build-check.sh index 250bb454..c2a4904c 100755 --- a/.travis/build-check.sh +++ b/.travis/build-check.sh @@ -8,7 +8,6 @@ fi if [ "${TRAVIS_OS_NAME}" = "linux" ]; then export LD_LIBRARY_PATH="${PREFIX}/lib:${LD_LIBRARY_PATH:-}" - export CFLAGS="${CFLAGS} -Werror" fi if [ "${TRAVIS_OS_NAME}" = "osx" ]; then @@ -21,7 +20,10 @@ if [ -z ${CHOST+x} ]; then ./configure --with-crypto-library="${SSLLIB}" ${EXTRA_CONFIG:-} || (cat config.log && exit 1) make -j$JOBS src/openvpn/openvpn --version || true - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ldd src/openvpn/openvpn; fi + if [ "${TRAVIS_OS_NAME}" = "linux" ]; then + ldd src/openvpn/openvpn; + export CFLAGS="${CFLAGS:-} -Werror" + fi if [ "${TRAVIS_OS_NAME}" = "osx" ]; then otool -L src/openvpn/openvpn; fi make check ${EXTRA_SCRIPT:-}