Page MenuHomeFreeBSD

LinuxKPI: change DECLARE_FLEX_ARRAY()
ClosedPublic

Authored by bz on Feb 22 2022, 10:51 PM.
Tags
None
Referenced Files
F166602488: D34350.id103203.diff
Fri, Aug 14, 8:05 PM
Unknown Object (File)
Thu, Aug 13, 7:05 PM
Unknown Object (File)
Jul 15 2026, 6:53 AM
Unknown Object (File)
Jul 11 2026, 8:10 PM
Unknown Object (File)
Jul 1 2026, 10:54 AM
Unknown Object (File)
Jun 30 2026, 12:49 PM
Unknown Object (File)
May 22 2026, 9:55 AM
Unknown Object (File)
May 7 2026, 3:34 AM

Details

Summary

DECLARE_FLEX_ARRAY can be used inside a structure. On FreeBSD due to
-Wgnu-variable-sized-type-not-at-end this yields an error. Use [0]
instead of [] to overcome this.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bz requested review of this revision.Feb 22 2022, 10:51 PM
hselasky added a subscriber: hselasky.

I think there are some issues with [0] aswell, but I don't remember exactly right now.

This revision is now accepted and ready to land.Feb 24 2022, 9:19 AM
This revision was automatically updated to reflect the committed changes.