lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.10.1508121713320.2527@hadrien>
Date:	Wed, 12 Aug 2015 17:16:46 +0200 (CEST)
From:	Julia Lawall <julia.lawall@...6.fr>
To:	Michal Marek <mmarek@...e.cz>
cc:	Kris Borer <kborer@...il.com>,
	Gilles Muller <Gilles.Muller@...6.fr>, nicolas.palix@...g.fr,
	linux-kernel@...r.kernel.org, cocci@...teme.lip6.fr
Subject: Re: [RFC] coccinelle: add style check for assignment in if



On Wed, 12 Aug 2015, Michal Marek wrote:

> On 2015-08-12 16:53, Kris Borer wrote:
> > On Wed, Aug 12, 2015 at 10:12 AM, Michal Marek <mmarek@...e.cz
> > <mailto:mmarek@...e.cz>> wrote:
> >
> >     On 2015-08-12 15:51, Kris Borer wrote:
> >     > Add a semantic patch for fixing some cases of checkpatch.pl <http://checkpatch.pl> error:
> >     >
> >     > ERROR: do not use assignment in if condition
> >
> >     There is a gcc warning for this already.
> >
> >     Michal
> >
> >
> > ​My intention was not to create another way to uncover problems but
> > rather to ​provide a tool for people to use to fix them. Let me know if
> > I am misunderstanding the purpose of this subsystem.
>
> OK, so this is fixing a style issue, and not cases of accidental
> assignment instead of '==' (for which there is a gcc warning and we
> hopefully do not have such errors in the kernel). While I'm probably
> ignorant and no not see how one style is better than the other, I see
> that some maintainers already applied your patches based on this check.
> So I'll merge it once Julia acks it.

Actually, assignments inside if tests are really annoying for Coccinelle,
because there become two different control flows from the assignment to
the test on the result.  So I would be happy to see these go away.

I'll check the semantic patch as soon as possible.

julia

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ