Use C99 flexible array
zero-length arrays have been deprecated since last millennium. https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
Typically we don't use a full path in the commit subject - e.g., it could be just bhyve: Use C99 flexible array instead of GNU extension. https://docs.freebsd.org/en/articles/committers-guide/#commit-log-message hints at this but is not explicit about what a "component" is
If the change relates to a specific component the subject line may be prefixed with that component name and a colon (:).
I can bring these changes in and update the commit message while doing so (but if you happen to update this pull request for other reasons you can roll that in). I would also add Pull Request: https://github.com/freebsd/freebsd-src/pull/869; we don't expect that in general in the submitted patch of course because the pull request number is not known a priori.
I can also take a look at updating the committer's guide with advice on what to use for a "component."
@ElyesH could you do a rebase on this branch so we get a fresh CI build? None of the CI failures are related to your patch.
see also dc0b4094abf6784bf1a9492c2fea3fb91116b014
ping
This doesn't actually build. Flexible arrays are only allowed in the outermost aggregate, yet there are cases where these aggregates are embedded in others and therefore are invalid. Please build test your patches.
This kind of conversion shouldn't also be done blindly. Each field should be audited to check it actually is being used as a pre-C99 flexible array and not something else, as I have pointed out is the case for rdma, but may also be true for others.
I'm going to close this. It's scope is too large. As @jrtc27 said, this needs to be done more carefully. Many of these changes are good, but separating the wheat from the chaff is too hard. This means this is not a good candidate for a pull request.