[parisc-linux] Re: (void) cast for READ_REG

Kyle McMartin kyle at mcmartin.ca
Thu May 11 11:26:53 MDT 2006


On Thu, May 11, 2006 at 11:25:17AM -0600, Grant Grundler wrote:
> "bogus" isn't the word I would use.
> I agree with Kyle that we don't want that behavior for every function.
> But I want the compiler to tell me when we throw away return values
> we normally use.
> 
> I'll remove them since your last commit makes the casts superfluous.
> And I don't recall why I opencoded READ_REG in the first place. :(
>

I think the reason we were seeing the warnings, and weren't with, for
example, printk(), is that le{32,64}_to_cpu is a macro and not a function.

And so we were actually discarding an assignment (statement with no
effect in general...) rather than just discarding a return value.





More information about the parisc-linux mailing list