Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

aws-nslick
Copy link
Contributor

@aws-nslick aws-nslick commented Sep 12, 2024

Stacked PRs:


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

prefer struct foo bar = {}' to struct foo bar = { 0 }' to avoid
-Wmissing-field-initializers warnings.
Signed-off-by: Nicholas Sielicki [email protected]

@aws-nslick aws-nslick requested a review from a team as a code owner September 12, 2024 00:57
@aws-nslick aws-nslick changed the base branch from aws-nslick/stack/34 to master September 12, 2024 01:09
@aws-nslick aws-nslick changed the base branch from master to aws-nslick/stack/34 September 12, 2024 01:52
@rauteric
Copy link
Contributor

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

@bwbarrett
Copy link
Contributor

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.

rauteric
rauteric previously approved these changes Sep 13, 2024
Copy link
Contributor

@rauteric rauteric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

aws-nslick added a commit to aws-nslick/nccl-net-ofi that referenced this pull request Sep 13, 2024
prefer `struct foo bar = {}' to `struct foo bar = { 0 }' to avoid
-Wmissing-field-initializers warnings.

stack-info: PR: aws#594, branch: aws-nslick/stack/35
@aws-nslick aws-nslick changed the base branch from aws-nslick/stack/34 to master September 13, 2024 17:49
@aws-nslick aws-nslick dismissed rauteric’s stale review September 13, 2024 17:49

The base branch was changed.

@aws-nslick aws-nslick changed the base branch from master to aws-nslick/stack/34 September 13, 2024 17:50
@aws-nslick aws-nslick changed the base branch from aws-nslick/stack/34 to master September 14, 2024 22:36
@aws-nslick aws-nslick changed the base branch from master to aws-nslick/stack/34 September 14, 2024 22:38
@aws-nslick aws-nslick changed the base branch from aws-nslick/stack/34 to master September 17, 2024 20:25
@aws-nslick aws-nslick changed the base branch from master to aws-nslick/stack/34 September 17, 2024 20:26
aws-nslick added a commit to aws-nslick/nccl-net-ofi that referenced this pull request Sep 22, 2024
prefer `struct foo bar = {}' to `struct foo bar = { 0 }' to avoid
-Wmissing-field-initializers warnings.

stack-info: PR: aws#594, branch: aws-nslick/stack/35
aws-nslick added a commit to aws-nslick/nccl-net-ofi that referenced this pull request Sep 22, 2024
prefer `struct foo bar = {}' to `struct foo bar = { 0 }' to avoid
-Wmissing-field-initializers warnings.

stack-info: PR: aws#594, branch: aws-nslick/stack/35
bwbarrett
bwbarrett previously approved these changes Sep 24, 2024
aws-nslick added a commit to aws-nslick/nccl-net-ofi that referenced this pull request Sep 25, 2024
prefer `struct foo bar = {}' to `struct foo bar = { 0 }' to avoid
-Wmissing-field-initializers warnings.

stack-info: PR: aws#594, branch: aws-nslick/stack/35
Signed-off-by: Nicholas Sielicki <[email protected]>
aws-nslick added a commit to aws-nslick/nccl-net-ofi that referenced this pull request Sep 25, 2024
prefer `struct foo bar = {}' to `struct foo bar = { 0 }' to avoid
-Wmissing-field-initializers warnings.

stack-info: PR: aws#594, branch: aws-nslick/stack/35
Signed-off-by: Nicholas Sielicki <[email protected]>
prefer `struct foo bar = {}' to `struct foo bar = { 0 }' to avoid
-Wmissing-field-initializers warnings.

stack-info: PR: #594, branch: aws-nslick/stack/35
Signed-off-by: Nicholas Sielicki <[email protected]>
@aws-nslick aws-nslick changed the base branch from aws-nslick/stack/34 to master September 26, 2024 03:06
@aws-nslick aws-nslick dismissed bwbarrett’s stale review September 26, 2024 03:06

The base branch was changed.

@aws-nslick aws-nslick merged commit deba705 into master Sep 26, 2024
31 checks passed
aws-ofiwg-bot pushed a commit to aws-ofiwg-bot/aws-ofi-nccl that referenced this pull request Oct 4, 2024
)

prefer `struct foo bar = {}' to `struct foo bar = { 0 }' to avoid
-Wmissing-field-initializers warnings.
Signed-off-by: Nicholas Sielicki <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants