cxgbe: replace zero sized array by flexible array
The issue was found while building cxgbe with gcc 10 (in illumos), the array subscription check is warning us about outside the bounds access. See also: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
This commit is contained in:
parent
3db1b221ed
commit
40c4557bee
@ -2862,7 +2862,7 @@ struct ulptx_sgl {
|
|||||||
__be32 len0;
|
__be32 len0;
|
||||||
__be64 addr0;
|
__be64 addr0;
|
||||||
#if !(defined C99_NOT_SUPPORTED)
|
#if !(defined C99_NOT_SUPPORTED)
|
||||||
struct ulptx_sge_pair sge[0];
|
struct ulptx_sge_pair sge[];
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -2876,7 +2876,7 @@ struct ulptx_isgl {
|
|||||||
__be32 cmd_nisge;
|
__be32 cmd_nisge;
|
||||||
__be32 rsvd;
|
__be32 rsvd;
|
||||||
#if !(defined C99_NOT_SUPPORTED)
|
#if !(defined C99_NOT_SUPPORTED)
|
||||||
struct ulptx_isge sge[0];
|
struct ulptx_isge sge[];
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user