Skip to content

smsc9220_eth_drv.c; fix warnings from "gcc -Wconversion" #1245

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

laroche
Copy link
Contributor

@laroche laroche commented Apr 27, 2025

smsc9220_eth_drv.c; fix warnings from "gcc -Wconversion"

Description

Test Steps

Checklist:

  • I have tested my changes. No regression in existing tests.
  • I have modified and/or added unit-tests to cover the code changes in this Pull Request.

Related Issue

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

smsc9220_eth_drv.c; fix warnings from "gcc -Wconversion"

Signed-off-by: Florian La Roche <[email protected]>
@laroche laroche requested a review from a team as a code owner April 27, 2025 19:19
@laroche
Copy link
Contributor Author

laroche commented Apr 27, 2025

FYI: Similar small patches are submitted for FreeRTOS and FreeRTOS-Kernel.

jasonpcarroll
jasonpcarroll previously approved these changes Apr 28, 2025
@jasonpcarroll
Copy link
Member

Looks good to me - will get a second reviewer. Thank you!

@@ -958,7 +958,7 @@ enum smsc9220_error_t smsc9220_read_mac_address( const struct smsc9220_eth_dev_t
mac[ 0 ] = mac_low & 0xFF;
mac[ 1 ] = ( mac_low >> 8 ) & 0xFF;
mac[ 2 ] = ( mac_low >> 16 ) & 0xFF;
Copy link
Member

@kar-rahul-aws kar-rahul-aws Apr 28, 2025

Choose a reason for hiding this comment

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

Any reason why the other mac indices are not typecasted to char.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe byte ordering issues on some architectures could make a difference?

best regards,

Florian La Roche

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.

4 participants