From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753196AbcGVQzq (ORCPT ); Fri, 22 Jul 2016 12:55:46 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:5828 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752410AbcGVQzp (ORCPT ); Fri, 22 Jul 2016 12:55:45 -0400 X-IronPort-AV: E=Sophos;i="5.28,405,1464645600"; d="scan'208";a="185655273" Date: Fri, 22 Jul 2016 18:56:47 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Nicholas Mc Guire cc: Gilles Muller , Nicolas Palix , Michal Marek , cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC] coccinelle: tests: if and else branch should probably not be identical In-Reply-To: <1469178343-29192-1-git-send-email-hofrat@osadl.org> Message-ID: References: <1469178343-29192-1-git-send-email-hofrat@osadl.org> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +virtual context > +virtual org > +virtual report > + > +@cond@ > +statement S1; > +position p; > +@@ > + > +<+... > +* if@p (...) S1 else S1 > +...+> You don't need the <+... ...+>. Just put the if by itself. julia > + > +@script:python depends on org@ > +p << cond.p; > +@@ > + > +cocci.print_main("WARNING: possible condition with no effect (if == else)",p) > + > +@script:python depends on report@ > +p << cond.p; > +@@ > + > +coccilib.report.print_report(p[0],"WARNING: possible condition with no effect (if == else)") > -- > 2.1.4 > >