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
F134599368: D27183.id.diff
Mon, Nov 3, 12:44 PM
F134599122: D27183.id79446.diff
Mon, Nov 3, 12:43 PM
F134598992: D27183.id79488.diff
Mon, Nov 3, 12:42 PM
F134598980: D27183.id79496.diff
Mon, Nov 3, 12:42 PM
F134598563: D27183.diff
Mon, Nov 3, 12:40 PM
Unknown Object (File)
Fri, Oct 31, 8:09 AM
Unknown Object (File)
Mon, Oct 27, 12:25 AM
Unknown Object (File)
Sun, Oct 26, 4:11 AM
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 Passed
Unit
No Test Coverage
Build Status
Buildable 34772
Build 31822: arc lint + arc unit

Event Timeline

brooks added inline comments.
sys/sys/malloc.h
149–150

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