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
F163444192: D27183.id79446.diff
Thu, Jul 23, 6:30 AM
Unknown Object (File)
Thu, Jul 23, 1:50 AM
Unknown Object (File)
Wed, Jul 22, 11:54 PM
Unknown Object (File)
Mon, Jul 20, 1:32 AM
Unknown Object (File)
Mon, Jul 20, 12:53 AM
Unknown Object (File)
Sat, Jul 18, 11:51 PM
Unknown Object (File)
Sat, Jul 18, 10:46 AM
Unknown Object (File)
Sat, Jul 18, 5:38 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