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

Add missing braces #1650

Merged
merged 1 commit into from
Jul 30, 2023
Merged

Conversation

quagla
Copy link
Contributor

@quagla quagla commented Jul 26, 2023

This solves a compile error when using -Wmissing-braces.

This solves a compile error when using -Wmissing-braces.

Signed-off-by: Alessio Quaglino <102665781+quagla@users.noreply.github.com>
@quagla quagla requested a review from kmuseth as a code owner July 26, 2023 12:40
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jul 26, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: quagla / name: Alessio Quaglino (7ff2fdd)

Copy link
Contributor

@jmlait jmlait left a comment

Choose a reason for hiding this comment

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

Specifically, mData is a union, so the { foo } will initialize the first member with the foo. Since that is an array, it pedantically should have foo = { a, b, c, d }; hence the double braces.

Copy link
Contributor

@kmuseth kmuseth left a comment

Choose a reason for hiding this comment

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

Looks good - thanks! I've also run into this issue before and as Jeff said it's caused by the fact that I'm using a union for mData.

@kmuseth kmuseth merged commit 3552fc6 into AcademySoftwareFoundation:master Jul 30, 2023
16 checks passed
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