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: