Re: [PATCH] Remove various dead assignments and dead increments found by the clang static analyzer
- From
Giuseppe Scrivano <gscrivano@gnu.org>
- Date
- Sep 27, 2009, 08:21 UTC
- Message-ID
- <874oqokdc2.fsf@master.homenet>
- In-Reply-To
- <alpine.LFD.2.00.0909262038470.4997@xanadu.home>
Nicolas Pitre <nico@fluxnic.net> writes:
> And the compiler (at least gcc) is indeed smart enough to realize that > nothing uses the result from the last statement, and does optimize away > the code associated to it already. So this patch is unlikely to change > anything to the compiled result.
Right, and gcc can do many other amazing things. But still it is used a variable that is never accessed, removing it can make the code slightly more readable.
Cheers, Giuseppe