[PATCH] staging: rtl8192e, rtl8192u: use correct notation to define pointer
Luc Van Oostenryck
luc.vanoostenryck at gmail.com
Wed Oct 28 04:42:32 UTC 2020
On Tue, Oct 27, 2020 at 12:23:03PM +0100, Greg KH wrote:
>
> Are you sure these changes are correct? This isn't just a list of
> structures after this at the end of the structure?
>
> Please look at commit 5979afa2c4d1 ("staging: Replace zero-length array
> with flexible-array member") which made most of these flexible arrays.
>
> This is not a pointer, it really is an array, I think sparse is really
> wrong here, be careful.
Sparse's warning is not about changing the definition of this member
as if it was the argument of a function. It's about how can you use
an array of structure when this structure has a flexible member.
It's a recent warning, added purposely to catch this.
See https://lore.kernel.org/r/CAHk-=wgJZ05ap8VQdzWDWJVWVtZiOYTc6cnNB8gNeQzEnfm-tw@mail.gmail.com
-- Luc
More information about the devel
mailing list