Skip to contentSkip to conversation

(void) cast for READ_REG

parisc-linux Grant Grundler 2 participants 2 messages May 11, 2006 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 1 line · Matthew Wilcox

The void casts are just bogus. Please take them out.

"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. :(

thanks,
grant
_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

#3 lore raw
Quoted 8 lines · Grant Grundler

"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.

_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux