RE: [PATCH] fsnotify: avoid gcc-10 zero-length-bounds warning

2020-05-07 Thread David Laight
From: Arnd Bergmann > Sent: 05 May 2020 16:00 ... > Yes, we usually backport trivial warning fixes to stable kernels to allow > building those with any modern compiler version. In this case wouldn't it be better to backport a change that disables the specific compiler warning? David - Re

Re: [PATCH] fsnotify: avoid gcc-10 zero-length-bounds warning

2020-05-05 Thread Linus Torvalds
On Tue, May 5, 2020 at 8:24 AM Arnd Bergmann wrote: > > Linus, let me know if you would like me to Cc you on the other gcc-10 > warning fixes I have and possibly apply some directly. Sure. If you have any of the "trivially correct, and doesn't make code look worse", push them my way. I only did

Re: [PATCH] fsnotify: avoid gcc-10 zero-length-bounds warning

2020-05-05 Thread Arnd Bergmann
On Tue, May 5, 2020 at 5:07 PM Gustavo A. R. Silva wrote: > On 5/5/20 10:00, Arnd Bergmann wrote: > > On Tue, May 5, 2020 at 4:35 PM Gustavo A. R. Silva > > wrote: > >> On 5/5/20 09:30, Arnd Bergmann wrote: > >> I wonder why would we need to backport these changes to -stable... merely > >> becaus

Re: [PATCH] fsnotify: avoid gcc-10 zero-length-bounds warning

2020-05-05 Thread Gustavo A. R. Silva
On 5/5/20 10:00, Arnd Bergmann wrote: > On Tue, May 5, 2020 at 4:35 PM Gustavo A. R. Silva > wrote: >> On 5/5/20 09:30, Arnd Bergmann wrote: >>> gcc-10 warns about accesses into the f_handle[] zero-length array. >>> >>> fs/notify/fdinfo.c: In function 'show_mark_fhandle': >>> fs/notify/fdinfo.c

Re: [PATCH] fsnotify: avoid gcc-10 zero-length-bounds warning

2020-05-05 Thread Arnd Bergmann
On Tue, May 5, 2020 at 4:35 PM Gustavo A. R. Silva wrote: > On 5/5/20 09:30, Arnd Bergmann wrote: > > gcc-10 warns about accesses into the f_handle[] zero-length array. > > > > fs/notify/fdinfo.c: In function 'show_mark_fhandle': > > fs/notify/fdinfo.c:66:47: error: array subscript 'i' is outside

Re: [PATCH] fsnotify: avoid gcc-10 zero-length-bounds warning

2020-05-05 Thread Gustavo A. R. Silva
On 5/5/20 09:30, Arnd Bergmann wrote: > gcc-10 warns about accesses into the f_handle[] zero-length array. > > fs/notify/fdinfo.c: In function 'show_mark_fhandle': > fs/notify/fdinfo.c:66:47: error: array subscript 'i' is outside the bounds of > an interior zero-length array 'unsigned char[0]'