[lkml]   [2020]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] sched/fair: Replace zero-length array with flexible-array member
On Thu, Feb 13, 2020 at 10:58:31AM -0600, Gustavo A. R. Silva wrote:
> > Hurmph, and where are all the other similar changes for kernel/sched/ ?
> > Because this really isn't the only such usage and I really don't see the
> > point in having a separate patch for every single one of them.
> >
> Yeah. I can do that. I'll send a patch for the whole kernel/sched.


> > Also; couldn't you've taught the compiler to also warn about [0] ?
> > There's really no other purpose to having a zero length array.
> >
> Yeah, this is something we'd like to see in the short future.
> Unfortunately, for now, the only way for the compiler to warn
> about zero-length arrays in through the use of "-pedantic".
> And we definitely don't want to follow this path.
> What we can do, in the meantime, is to add a test for it to
> checkpatch.

Oh, I means, warn if it isn't the last member of a struct. Not warn on
any use. Or we mean the same and I'm just confused.

 \ /
  Last update: 2020-02-13 18:07    [W:0.080 / U:1.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site