lkml.org 
[lkml]   [2023]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][next] MIPS: dec: prom: Address -Warray-bounds warning
On Fri, 23 Jun 2023, Thomas Bogendoerfer wrote:

> > Zero-length arrays are deprecated, and we are replacing them with flexible
> > array members instead. So, replace zero-length array with flexible-array
> > member in struct memmap.

Technically it is a semantics bug fix actually, as the TURBOchannel
firmware specification (from Jan 1993) says it's:

typedef struct{ int pagesize; unsigned char bitmap[];}memmap;
int getbitmap(memmap *map);

(formatting preserved as in the document) so it should have always been a
flexible array member. Maybe old (2.x) GCC versions had an issue with it
or something, as otherwise I can't imagine why whoever added our typedef
did it differently from the spec.

> applied to mips-next.

Not sure if you can retrofit it, but:

Acked-by: Maciej W. Rozycki <macro@orcam.me.uk>

Maciej

\
 
 \ /
  Last update: 2023-06-23 15:42    [W:0.066 / U:0.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site