From patchwork Tue Oct 16 16:42:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Ospite X-Patchwork-Id: 10643867 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2F8611508 for ; Tue, 16 Oct 2018 16:42:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1DD302A5B8 for ; Tue, 16 Oct 2018 16:42:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 121AF2A5D0; Tue, 16 Oct 2018 16:42:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEB512A5D9 for ; Tue, 16 Oct 2018 16:42:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727187AbeJQAdt (ORCPT ); Tue, 16 Oct 2018 20:33:49 -0400 Received: from mail.ao2.it ([92.243.12.208]:59679 "EHLO ao2.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727280AbeJQAdt (ORCPT ); Tue, 16 Oct 2018 20:33:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ao2.it; s=20180927; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=BIbSqgsNORrzXf0Ajmn3ScsdFAWStUvOscxOTpviaGg=; b=L0GYYJm33fiPDDY+Xs8mOtX4igyFkfoHHX+4sFy39jZiTPQ/C9h46C2UEFvpjY4SNZ1t5guUeUa3NiBw2U9FyCtSOuA4jBs+ahFsAYTPmIYYFz+Mx98gKpB7wlBMp1S5Pa7saraKKMTrVJWiZ9FkWjl3pUuAT+UA+rJnr0inj+uJZ3AxqB4uXDCjWWDr66KzNj0/mBUfktror2lxyUnoyPUpn8bSKoQVQzF1DaCtrrZPW99kkvCFDB1un2s6Z2AjJPw4esQiPMOZ46avhdfEV5BlaTUu823KAaw1TW3FHnOiPFOGwTUMDJr28n85KDhkXaaYU7x8CDr3PyHNCjMOFQ==; Received: from localhost ([::1] helo=jcn) by ao2.it with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1gCSQJ-0003wS-S5; Tue, 16 Oct 2018 18:42:23 +0200 Received: from ao2 by jcn with local (Exim 4.91) (envelope-from ) id 1gCSQS-0007fG-DX; Tue, 16 Oct 2018 18:42:32 +0200 From: Antonio Ospite To: dash@vger.kernel.org Cc: Antonio Ospite Subject: [PATCH 1/5] Update configure.ac with suggestions from autoupdate Date: Tue, 16 Oct 2018 18:42:16 +0200 Message-Id: <20181016164220.29413-2-ao2@ao2.it> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181016164220.29413-1-ao2@ao2.it> References: <20181016164220.29413-1-ao2@ao2.it> MIME-Version: 1.0 X-Face: z*RaLf`X<@C75u6Ig9}{oW$H;1_\2t5)({*|jhM/Vb;]yA5\I~93>J<_`<4)A{':UrE Sender: dash-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dash@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Apply the changes suggested by running autoupdate on the source repository: 1. Properly quote AC_INIT arguments. 2. Use AC_USE_SYSTEM_EXTENSIONS instead of AC_GNU_SOURCE. The former is a superset of the latter, and enables more options, see https://www.gnu.org/software/autoconf/manual/autoconf-2.60/html_node/Posix-Variants.html Signed-off-by: Antonio Ospite --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 4829288..594fb42 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT(dash, 0.5.10.2) +AC_INIT([dash],[0.5.10.2]) AM_INIT_AUTOMAKE([foreign subdir-objects]) AC_CONFIG_SRCDIR([src/main.c]) @@ -6,7 +6,7 @@ AC_CONFIG_HEADERS(config.h) dnl Checks for programs. AC_PROG_CC -AC_GNU_SOURCE +AC_USE_SYSTEM_EXTENSIONS AC_PROG_YACC AC_MSG_CHECKING([for build system compiler]) From patchwork Tue Oct 16 16:42:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Ospite X-Patchwork-Id: 10643861 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 374A61508 for ; Tue, 16 Oct 2018 16:42:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 25B372A5B8 for ; Tue, 16 Oct 2018 16:42:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A2842A5F6; Tue, 16 Oct 2018 16:42:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 942A32A5D0 for ; Tue, 16 Oct 2018 16:42:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727220AbeJQAdu (ORCPT ); Tue, 16 Oct 2018 20:33:50 -0400 Received: from mail.ao2.it ([92.243.12.208]:59680 "EHLO ao2.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727384AbeJQAdt (ORCPT ); Tue, 16 Oct 2018 20:33:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ao2.it; s=20180927; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=L/QnxmQJW95AyIZx0spHKOd8XvXY6Gi0lf63Il8LXfI=; b=N57M1E2eG1bTSBm6ChyW8NpSUtyEPWVj72TGs4hTpH45l6lxi0szfX5ej1hUxP/4oJDBRp+EpAbsRz4DVmvlqUwuh02gIpEFDEeSPS5R99JN2OaL6cn93IpicNTizBF12Fd1rrS676V5hiR3xg+Th4YYLnA1p0KqIczslGbHlcMA8vFtMhNywd9TQAOoux5r81xTolxRxdVTEOmQ7TkWsR6RJs6lLO/zh3PzlGEKOcJEvbfFRbzIwFV+X2MuKUtNZj+30J9NSV8ZWtdVCvSuApXDPCB8jekhA4gw+QMPO/uuUwFtqEAsawAoWFOyVxQWu2KL/rCgGIKzDGhQWmh6ww==; Received: from localhost ([::1] helo=jcn) by ao2.it with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1gCSQK-0003wT-0x; Tue, 16 Oct 2018 18:42:24 +0200 Received: from ao2 by jcn with local (Exim 4.91) (envelope-from ) id 1gCSQS-0007fI-Gc; Tue, 16 Oct 2018 18:42:32 +0200 From: Antonio Ospite To: dash@vger.kernel.org Cc: Antonio Ospite Subject: [PATCH 2/5] Enable automake silent rules Date: Tue, 16 Oct 2018 18:42:17 +0200 Message-Id: <20181016164220.29413-3-ao2@ao2.it> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181016164220.29413-1-ao2@ao2.it> References: <20181016164220.29413-1-ao2@ao2.it> MIME-Version: 1.0 X-Face: z*RaLf`X<@C75u6Ig9}{oW$H;1_\2t5)({*|jhM/Vb;]yA5\I~93>J<_`<4)A{':UrE Sender: dash-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dash@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Enable automake silent rules to make it easier to spot compilation problems. Silent rules will be enabled by default, but only if they are available, in order to keep compatibility with older autotools versions. Prepend the silent strings also to custom rules. Signed-off-by: Antonio Ospite --- configure.ac | 2 ++ src/Makefile.am | 16 ++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 594fb42..036730d 100644 --- a/configure.ac +++ b/configure.ac @@ -4,6 +4,8 @@ AC_CONFIG_SRCDIR([src/main.c]) AC_CONFIG_HEADERS(config.h) +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES(yes)]) + dnl Checks for programs. AC_PROG_CC AC_USE_SYSTEM_EXTENSIONS diff --git a/src/Makefile.am b/src/Makefile.am index 8b9eb8c..1732465 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -44,27 +44,27 @@ EXTRA_DIST = \ mknodes.c nodetypes nodes.c.pat mksyntax.c mksignames.c token.h token_vars.h: mktokens - $(SHELL) $^ + $(AM_V_GEN)$(SHELL) $^ builtins.def: builtins.def.in $(top_builddir)/config.h - $(COMPILE) -E -x c -o $@ $< + $(AM_V_CC)$(COMPILE) -E -x c -o $@ $< builtins.c builtins.h: mkbuiltins builtins.def - $(SHELL) $^ + $(AM_V_GEN)$(SHELL) $^ init.c: mkinit $(dash_CFILES) - ./$^ + $(AM_V_GEN)./$^ nodes.c nodes.h: mknodes nodetypes nodes.c.pat - ./$^ + $(AM_V_GEN)./$^ syntax.c syntax.h: mksyntax - ./$^ + $(AM_V_GEN)./$^ signames.c: mksignames - ./$^ + $(AM_V_GEN)./$^ mksyntax: token.h $(HELPERS): %: %.c - $(COMPILE_FOR_BUILD) -o $@ $< + $(AM_V_CC)$(COMPILE_FOR_BUILD) -o $@ $< From patchwork Tue Oct 16 16:42:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Ospite X-Patchwork-Id: 10643863 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6242F18BC for ; Tue, 16 Oct 2018 16:42:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 501CB2A5B8 for ; Tue, 16 Oct 2018 16:42:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 44ACF2A5D0; Tue, 16 Oct 2018 16:42:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 14D1C2A5F3 for ; Tue, 16 Oct 2018 16:42:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727386AbeJQAdu (ORCPT ); Tue, 16 Oct 2018 20:33:50 -0400 Received: from mail.ao2.it ([92.243.12.208]:59684 "EHLO ao2.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727378AbeJQAdt (ORCPT ); Tue, 16 Oct 2018 20:33:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ao2.it; s=20180927; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=wlEPel2H/t3dsiKnbVrp0vBGKzmJJZaxhsM6GRoXWQQ=; b=kNTW06//Ni845iHnJUR3euXbPewjGYGn8fg47X+DvXOB+nmzbPtOz5QIvcBRNvVA0OoXrkvp4zXZxZonokSLfs4qhySZLzQ0mNa0F+tC/hX9K/6ZAgSY3CLKhFzsFjOGW67cAInbFz/osC+xbbrOS/CgDMKDkFQ5vFRH4jXRoO/5F0QoUyN3kk8PhnYkbUe+DiRG9R/S0VpUrCv7Ci6B3NWD/QR2cP6DpBPm6m0pYsODGmuF9yIVviEiCXHztEFtcG5uk5+wl8gTeo8Zsahdt+HnmlIOXUMDBLsJRBvmNewT+RO1W4+KCL3EX7SXMcJ4E1l0644HxkwzCRD26xA9Gg==; Received: from localhost ([::1] helo=jcn) by ao2.it with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1gCSQK-0003wY-8l; Tue, 16 Oct 2018 18:42:24 +0200 Received: from ao2 by jcn with local (Exim 4.91) (envelope-from ) id 1gCSQS-0007fK-J8; Tue, 16 Oct 2018 18:42:32 +0200 From: Antonio Ospite To: dash@vger.kernel.org Cc: Antonio Ospite Subject: [PATCH 3/5] Add some missing autotools files to the .gitignore file Date: Tue, 16 Oct 2018 18:42:18 +0200 Message-Id: <20181016164220.29413-4-ao2@ao2.it> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181016164220.29413-1-ao2@ao2.it> References: <20181016164220.29413-1-ao2@ao2.it> MIME-Version: 1.0 X-Face: z*RaLf`X<@C75u6Ig9}{oW$H;1_\2t5)({*|jhM/Vb;]yA5\I~93>J<_`<4)A{':UrE Sender: dash-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dash@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The /src/bltin/.deps/ and /src/bltin/.dirstamp files are missing in .gitignore and still pollute "git status" output, add them. Signed-off-by: Antonio Ospite --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 579bd47..51277d1 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,8 @@ Makefile /config.log /config.status /src/.deps/ +/src/bltin/.deps/ +/src/bltin/.dirstamp /stamp-h1 # generated by make From patchwork Tue Oct 16 16:42:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Antonio Ospite X-Patchwork-Id: 10643865 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D63DA3C13 for ; Tue, 16 Oct 2018 16:42:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C42462A5B8 for ; Tue, 16 Oct 2018 16:42:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B832A2A5D0; Tue, 16 Oct 2018 16:42:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E89CF2A5EC for ; Tue, 16 Oct 2018 16:42:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727384AbeJQAdu (ORCPT ); Tue, 16 Oct 2018 20:33:50 -0400 Received: from mail.ao2.it ([92.243.12.208]:59683 "EHLO ao2.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727386AbeJQAdt (ORCPT ); Tue, 16 Oct 2018 20:33:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ao2.it; s=20180927; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=raBLxgv2fTdYAjRX8zDgt1hIGgcwIPQpuDviF0lRUWE=; b=oniKH0hESXVgXciih1QngI8w2OUx/wkE0omiBObwJTxBtW+hUDbO1puPInusKS0fmq4/HnFxJXwMpdLbLFazotCXUhfwLVOLtVSxMs6iY3X/TlgNyGXy1f+8HeMC0JHGIWanV/nf9I6b0VSJ1gJn6PimHPzyHREtg7VdA1DErxi+R/hvcppzLrFvfqlpXpju+kHKSmaPYJpgTs5equ/LYRxqoQ1uOoS1cp+Z9ykCwVdlS3YDvJeUcXUeqKeQJEnX0KorBEx9p0y2i0C/QE038+l+Tqsrc0BXj0jbDr8GZygUATdpQP1vDibUq8KDCvPtyfs7Idr3Ad94fNrQ21Anjw==; Received: from localhost ([::1] helo=jcn) by ao2.it with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1gCSQK-0003wX-74; Tue, 16 Oct 2018 18:42:24 +0200 Received: from ao2 by jcn with local (Exim 4.91) (envelope-from ) id 1gCSQS-0007fM-LU; Tue, 16 Oct 2018 18:42:32 +0200 From: Antonio Ospite To: dash@vger.kernel.org Cc: Antonio Ospite Subject: [PATCH 4/5] Stop using deprecated function sigsetmask() Date: Tue, 16 Oct 2018 18:42:19 +0200 Message-Id: <20181016164220.29413-5-ao2@ao2.it> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181016164220.29413-1-ao2@ao2.it> References: <20181016164220.29413-1-ao2@ao2.it> MIME-Version: 1.0 X-Face: z*RaLf`X<@C75u6Ig9}{oW$H;1_\2t5)({*|jhM/Vb;]yA5\I~93>J<_`<4)A{':UrE Sender: dash-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dash@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP sigsetmask() is deprecated, at least on recent glibc; stop using it to silence the following compiler warning: ----------------------------------------------------------------------- system.h:40:2: warning: ‘sigsetmask’ is deprecated [-Wdeprecated-declarations] sigsetmask(0); ^~~~~~~~~~ In file included from /usr/include/x86_64-linux-gnu/sys/param.h:28, from shell.h:52, from nodes.c:46: /usr/include/signal.h:173:12: note: declared here extern int sigsetmask (int __mask) __THROW __attribute_deprecated__; ^~~~~~~~~~ ----------------------------------------------------------------------- Using sigprocmask() and friends unconditionally should not be a problem, as commit e94a964 (eval: Add vfork support, 2018-05-19) also does it. Signed-off-by: Antonio Ospite --- configure.ac | 2 +- src/system.h | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 036730d..32ef456 100644 --- a/configure.ac +++ b/configure.ac @@ -89,7 +89,7 @@ AC_CHECK_DECL([PRIdMAX],, dnl Checks for library functions. AC_CHECK_FUNCS(bsearch faccessat getpwnam getrlimit isalpha killpg \ mempcpy \ - sigsetmask stpcpy strchrnul strsignal strtod strtoimax \ + stpcpy strchrnul strsignal strtod strtoimax \ strtoumax sysconf) dnl Check whether it's worth working around FreeBSD PR kern/125009. diff --git a/src/system.h b/src/system.h index a8d09b3..6950e6e 100644 --- a/src/system.h +++ b/src/system.h @@ -36,13 +36,9 @@ static inline void sigclearmask(void) { -#ifdef HAVE_SIGSETMASK - sigsetmask(0); -#else sigset_t set; sigemptyset(&set); sigprocmask(SIG_SETMASK, &set, 0); -#endif } #ifndef HAVE_MEMPCPY From patchwork Tue Oct 16 16:42:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Antonio Ospite X-Patchwork-Id: 10643859 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1B5C917D2 for ; Tue, 16 Oct 2018 16:42:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A71E2A5B8 for ; Tue, 16 Oct 2018 16:42:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F2F382A5F0; Tue, 16 Oct 2018 16:42:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A27D2A5B8 for ; Tue, 16 Oct 2018 16:42:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727280AbeJQAdu (ORCPT ); Tue, 16 Oct 2018 20:33:50 -0400 Received: from mail.ao2.it ([92.243.12.208]:59682 "EHLO ao2.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727220AbeJQAdt (ORCPT ); Tue, 16 Oct 2018 20:33:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ao2.it; s=20180927; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=oAPwVv87r5HySBejwU4H3usKP7PHlOHFEQwNaPAsuZE=; b=Ooo9oeEBOZguy5hTTIfDVcPVZoot80XpqzEm5VUsVDQDYJtqCU+3Cx3XSx2ySiPaDplrAppwZeTpB1w6K3elc1Jv4fDClAAPSeY6CctuhfYcKb51Z9lfzxoO23tx8KzDZFvWEZpYGvojMJF4dpcJKSj/1j2d+KM2TvseOWoYJ3j6gdDdxs0yyPre24U/wP64ojX0GWQVSLo3furhPZhItcjquiVQ2Nnw7JJouilEK+KK8R4acwb88awDUUW/9DETfefQOOZUeNQBEcmvWvg5+U+jstScXB8aJ1rzDY8UMrVTcW5TiKKWz1E8kOqANbXy+EMgkfRaq9Apm2yfBBzRlg==; Received: from localhost ([::1] helo=jcn) by ao2.it with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1gCSQK-0003wW-46; Tue, 16 Oct 2018 18:42:24 +0200 Received: from ao2 by jcn with local (Exim 4.91) (envelope-from ) id 1gCSQS-0007fO-OB; Tue, 16 Oct 2018 18:42:32 +0200 From: Antonio Ospite To: dash@vger.kernel.org Cc: Antonio Ospite Subject: [PATCH 5/5] Silence compiler warning about missing parentheses Date: Tue, 16 Oct 2018 18:42:20 +0200 Message-Id: <20181016164220.29413-6-ao2@ao2.it> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181016164220.29413-1-ao2@ao2.it> References: <20181016164220.29413-1-ao2@ao2.it> MIME-Version: 1.0 X-Face: z*RaLf`X<@C75u6Ig9}{oW$H;1_\2t5)({*|jhM/Vb;]yA5\I~93>J<_`<4)A{':UrE Sender: dash-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dash@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Gcc gives a warning about some missing parentheses: ----------------------------------------------------------------------- eval.c: In function ‘evaltree’: eval.c:282:15: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] if (!status == isor || evalskip) ^~ eval.c:282:7: note: add parentheses around left hand side expression to silence this warning if (!status == isor || evalskip) ^~~~~~~ ( ) ----------------------------------------------------------------------- Add the parentheses to silence the warning. Signed-off-by: Antonio Ospite --- src/eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eval.c b/src/eval.c index 6185db4..6f09501 100644 --- a/src/eval.c +++ b/src/eval.c @@ -279,7 +279,7 @@ checkexit: isor = n->type - NAND; status = evaltree(n->nbinary.ch1, (flags | ((isor >> 1) - 1)) & EV_TESTED); - if (!status == isor || evalskip) + if ((!status) == isor || evalskip) break; n = n->nbinary.ch2; evaln: