-
Notifications
You must be signed in to change notification settings - Fork 84
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(PeriphDrivers): Fix -Wcast-align
warning for MAX78000 & MAX78002 SYS Drivers
#706
Conversation
|
||
MXC_FLC_LockInfoBlock(MXC_INFO0_MEM_BASE); | ||
|
||
if (usn != NULL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check for a null pointer is redundant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we gonna see this warning on other parts as well? |
Not by default. We should eventually apply this to the other micros, but at a low priority |
Pull Request Template
Description
This PR fixes the
-Wcast-align
errors for the MAX78000 & MAX78002 USN calculations. Our AES struct enforces 32-bit data alignment, so this solution uses an intermediate buffer andmemcpy
's out to the user's buffers.Test Program
// project.mk PROJ_CFLAGS += -Wcast-align -Werror
Checklist Before Requesting Review