-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix conversion warning for GCC/ARM_CM4F #653
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,7 +51,7 @@ | |
#define portLONG long | ||
#define portSHORT short | ||
#define portSTACK_TYPE uint32_t | ||
#define portBASE_TYPE long | ||
#define portBASE_TYPE uint32_t | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think it's ok to change this to an unsigned type - it is meant to be signed as per every other port and as it has always been. Changing it will probably cause pain for many users. If it is changed, which I advise strongly against, it will also need to be changed in all the ARMv7-M and ARMv8-M ports. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. portBASE_TYPE is actually a deprecated type, kept only so application code still builds. Recent code should be using BaseType_t. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for your review and information. Currently, It caused the compile error because the warnings are treated as errors. What is your suggestion to fix this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you know which specific warning flag is giving you an error? The pedantic flag is something we've discussed removing in other repos in the past. If this is causing your issue - we might want to consider removing it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, which line is causing the error? Is it the kernel code or the application code? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, this was -Wconversion flag in my application code. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for taking the time to report back :) |
||
|
||
typedef portSTACK_TYPE StackType_t; | ||
typedef long BaseType_t; | ||
|
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 seems okay but it needs to be done across multiple ports. Do you want to do that too or would you prefer us to do that?
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.
Yes, I have created #658 . Thanks.