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: <20120322160336.66e9a88b.akpm@linux-foundation.org>
Date:	Thu, 22 Mar 2012 16:03:36 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Uwe Kleine-König <uwe@...ine-koenig.org>
Cc:	Lucas De Marchi <lucas.demarchi@...fusion.mobi>,
	linux-kernel@...r.kernel.org, Greg KH <greg@...ah.com>
Subject: Re: [PATCH] telephony/ixj: Fix warning about sequence points

On Mon, 19 Mar 2012 11:57:44 +0100
Uwe Kleine-K__nig <uwe@...ine-koenig.org> wrote:

> In the statement
> 
> 	j->caplist[j->caps].handle = j->caps++;
> 
> there is no sequence point between the usage of j->caps on the LHS of the
> assignment and the incrementation on its RHS. So it's not defined in Standard C
> if j->caps is already incremented when used on the LHS even though the postfix
> ++ operator is used. To properly fix that the incrementation has to be done in
> a seperate expression.
> 
> This fixes:
> 	drivers/telephony/ixj.c: In function ___add_caps___:
> 	drivers/telephony/ixj.c:5930:38: warning: operation on ___j->caps___ may be undefined [-Wsequence-point]
> 	drivers/telephony/ixj.c:5950:38: warning: operation on ___j->caps___ may be undefined [-Wsequence-point]
> 	drivers/telephony/ixj.c:5954:38: warning: operation on ___j->caps___ may be undefined [-Wsequence-point]
> 	drivers/telephony/ixj.c:5965:39: warning: operation on ___j->caps___ may be undefined [-Wsequence-point]
> 	drivers/telephony/ixj.c:5976:39: warning: operation on ___j->caps___ may be undefined [-Wsequence-point]
> 	drivers/telephony/ixj.c:5988:39: warning: operation on ___j->caps___ may be undefined [-Wsequence-point]
> 	drivers/telephony/ixj.c:5998:38: warning: operation on ___j->caps___ may be undefined [-Wsequence-point]
> 	drivers/telephony/ixj.c:6003:38: warning: operation on ___j->caps___ may be undefined [-Wsequence-point]
> 	drivers/telephony/ixj.c:6008:38: warning: operation on ___j->caps___ may be undefined [-Wsequence-point]
> 	drivers/telephony/ixj.c:6013:38: warning: operation on ___j->caps___ may be undefined [-Wsequence-point]
> 	drivers/telephony/ixj.c:6019:38: warning: operation on ___j->caps___ may be undefined [-Wsequence-point]
> 	drivers/telephony/ixj.c:6026:39: warning: operation on ___j->caps___ may be undefined [-Wsequence-point]
> 	drivers/telephony/ixj.c:6031:39: warning: operation on ___j->caps___ may be undefined [-Wsequence-point]
> 	drivers/telephony/ixj.c:6036:39: warning: operation on ___j->caps___ may be undefined [-Wsequence-point]
> 	drivers/telephony/ixj.c:6041:39: warning: operation on ___j->caps___ may be undefined [-Wsequence-point]
> 	drivers/telephony/ixj.c:6049:39: warning: operation on ___j->caps___ may be undefined [-Wsequence-point]
> 	drivers/telephony/ixj.c:6057:39: warning: operation on ___j->caps___ may be undefined [-Wsequence-point]
> 	drivers/telephony/ixj.c:6065:39: warning: operation on ___j->caps___ may be undefined [-Wsequence-point]
> 	drivers/telephony/ixj.c:6071:39: warning: operation on ___j->caps___ may be undefined [-Wsequence-point]
> 
> Signed-off-by: Uwe Kleine-K__nig <uwe@...ine-koenig.org>
> ---
>  drivers/telephony/ixj.c |   57 +++++++++++++++++++++++++++++++---------------

fyi, ixj.c has been moved into staging/, with a view to removing it
altogether.

It will be sad to see it go - it has stood as a great example of what not
to do ;)  And no, I don't now how to find out if anyone is using it either.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ