ieee1275/ofnet: Fix hw_addr variable initialization#210
Open
jwrdegoede wants to merge 2 commits intorhboot:fedora-44from
Open
ieee1275/ofnet: Fix hw_addr variable initialization#210jwrdegoede wants to merge 2 commits intorhboot:fedora-44from
jwrdegoede wants to merge 2 commits intorhboot:fedora-44from
Conversation
Signed-off-by: Leo Sandoval <lsandova@redhat.com>
The latest gcc does not like the initializer used for the
grub_net_link_level_address_t hw_addr variable:
../../grub-core/net/drivers/ieee1275/ofnet.c: In function ‘grub_ieee1275_parse_bootpath’:
../../grub-core/net/drivers/ieee1275/ofnet.c:158:3: warning: braces around scalar initializer
158 | grub_net_link_level_address_t hw_addr = {0, {{0, 0, 0, 0, 0, 0}}};
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../grub-core/net/drivers/ieee1275/ofnet.c:158:3: note: (near initialization for ‘hw_addr.len’)
../../grub-core/net/drivers/ieee1275/ofnet.c:158:3: error: braces around scalar initializer
../../grub-core/net/drivers/ieee1275/ofnet.c:158:3: note: (near initialization for ‘hw_addr.len’)
../../grub-core/net/drivers/ieee1275/ofnet.c:158:52: warning: excess elements in scalar initializer
158 | grub_net_link_level_address_t hw_addr = {0, {{0, 0, 0, 0, 0, 0}}};
...
Since we're zeroing it anyways switch to a simpler initializer
to fix this.
Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Contributor
Author
|
Matching dist-git PR: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As requested here is a separate pull-request with just the PPC buildfix from #209 . I'll also submit a dist-git PR with just the PPC buildfix.
The latest gcc does not like the initializer used for the grub_net_link_level_address_t hw_addr variable:
../../grub-core/net/drivers/ieee1275/ofnet.c: In function ‘grub_ieee1275_parse_bootpath’: ../../grub-core/net/drivers/ieee1275/ofnet.c:158:3: warning: braces around scalar initializer
158 | grub_net_link_level_address_t hw_addr = {0, {{0, 0, 0, 0, 0, 0}}};
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../grub-core/net/drivers/ieee1275/ofnet.c:158:3: note: (near initialization for ‘hw_addr.len’)
../../grub-core/net/drivers/ieee1275/ofnet.c:158:3: error: braces around scalar initializer
../../grub-core/net/drivers/ieee1275/ofnet.c:158:3: note: (near initialization for ‘hw_addr.len’)
../../grub-core/net/drivers/ieee1275/ofnet.c:158:52: warning: excess elements in scalar initializer
158 | grub_net_link_level_address_t hw_addr = {0, {{0, 0, 0, 0, 0, 0}}};
...
Since we're zeroing it anyways switch to a simpler initializer to fix this.