28 Feb
2022
28 Feb
'22
9:27 p.m.
On Mon, 2022-02-28 at 20:16 +0000, Matthew Wilcox wrote:
On Mon, Feb 28, 2022 at 12:10:24PM -0800, Linus Torvalds wrote:
We can do
typeof(pos) pos
in the 'for ()' loop, and never use __iter at all.
That means that inside the for-loop, we use a _different_ 'pos' than outside.
Then we can never use -Wshadow ;-( I'd love to be able to turn it on; it catches real bugs.
I was just going to say the same thing...
If we're willing to change the API for the macro, we could do
list_for_each_entry(type, pos, head, member)
and then actually take advantage of -Wshadow?
johannes