aws / aws-ofi-nccl

This is a plugin which lets EC2 developers use libfabric as network provider while running NCCL applications.
Apache License 2.0
147 stars 56 forks source link

fix(tree): use empty brace initializers for zero-initialization #594

Closed aws-nslick closed 1 month ago

aws-nslick commented 2 months ago

Stacked PRs:


fix(tree): use empty brace initializers for zero-initialization

prefer struct foo bar = {}' tostruct foo bar = { 0 }' to avoid -Wmissing-field-initializers warnings. Signed-off-by: Nicholas Sielicki nslick@amazon.com

rauteric commented 2 months ago

This is apparently only valid in C since C23 (https://en.cppreference.com/w/c/language/struct_initialization), which makes me wary.

bwbarrett commented 2 months ago

It is only valid in recent C, but GCC has been happy with it for some time. If it doesn't cause warnings on AL2 or U20 with our default debug compiler flags, I'd ship it. It'll make the C++ conversion easier.