Thread (6 messages) flat view 6 messages, 4 authors, 2007-05-20

Re: 2.6.22-rc2 built on ppc

From: Segher Boessenkool <hidden>
Date: 2007-05-20 18:19:36

quoted
I don't know what's to blame for the warnings --- new gcc versions or
the change from do { } while (0) to ((void)0)? =A0Either way, the=20
compiler
should comprehend that the arguments stuffed into the =
dma_unmap_single
quoted
macro are _not_ unused by accident; it should stay quiet and optimize
the unused variables away if run with -Osomething.
There is not much that the compiler can do by itself, since the macro
expansion happens in the preprocessor.
Even if the compiler could see that the variables are
used as macro arguments, this doesn't automatically
equate to it being able to infer the variables are
unused on purpose.
I think the best solution would be to replace the macros with
inline functions, so that the compiler can see them.
This should shut up the warnings, yes...
This will
also give gcc the chance to do type checking on the arguments.
...and it is a good idea no matter what.


Segher
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help