Page MenuHomeFreeBSD

[malloc] quieten -Werror=missing-braces with malloc.h wth gcc-6.4
ClosedPublic

Authored by adrian on Nov 11 2020, 10:45 PM.
Tags
None
Referenced Files
F132959504: D27183.id.diff
Tue, Oct 21, 1:38 PM
F132959496: D27183.id79496.diff
Tue, Oct 21, 1:38 PM
F132959494: D27183.id79488.diff
Tue, Oct 21, 1:38 PM
F132959491: D27183.id79446.diff
Tue, Oct 21, 1:38 PM
F132916936: D27183.id.diff
Tue, Oct 21, 4:12 AM
F132906959: D27183.diff
Tue, Oct 21, 1:52 AM
Unknown Object (File)
Thu, Oct 16, 2:04 AM
Unknown Object (File)
Thu, Oct 9, 6:35 PM
Subscribers

Details

Summary

This sets off gcc-6.4 to spit out a 'error: missing braces around initializer'
error when compiling this. Adding a second set of braces around the 0
sub-struct initializer fixes things.

Test Plan
  • compiled for gcc-6.4

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

brooks added inline comments.
sys/sys/malloc.h
150 ↗(On Diff #79446)

Just drop the initialization. Designated initializers zero all members not mentioned.

update based on comment from brooks@

This revision is now accepted and ready to land.Nov 13 2020, 12:45 AM