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

fix conversion warning for GCC/ARM_CM4F #653

Closed
wants to merge 1 commit into from
Closed

fix conversion warning for GCC/ARM_CM4F #653

wants to merge 1 commit into from

Conversation

votrungchi
Copy link
Contributor

@votrungchi votrungchi commented Mar 31, 2023

fix conversion warning for GCC/ARM_CM4F

Description

Test Steps

Checklist:

  • [x ] 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.

@votrungchi votrungchi requested a review from a team as a code owner March 31, 2023 18:26
@codecov
Copy link

codecov bot commented Apr 1, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (1b8a424) 94.46% compared to head (432f06a) 94.46%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #653   +/-   ##
=======================================
  Coverage   94.46%   94.46%           
=======================================
  Files           6        6           
  Lines        2422     2422           
  Branches      594      594           
=======================================
  Hits         2288     2288           
  Misses         85       85           
  Partials       49       49           
Flag Coverage Δ
unittests 94.46% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -51,7 +51,7 @@
#define portLONG long
#define portSHORT short
#define portSTACK_TYPE uint32_t
#define portBASE_TYPE long
#define portBASE_TYPE uint32_t
Copy link
Contributor

Choose a reason for hiding this comment

The 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.

Copy link
Contributor

Choose a reason for hiding this comment

The 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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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?

Copy link
Member

Choose a reason for hiding this comment

The 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.

Copy link
Member

Choose a reason for hiding this comment

The 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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, this was -Wconversion flag in my application code.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for taking the time to report back :)

This was linked to issues Apr 1, 2023
Closed
Closed
@@ -304,7 +304,7 @@ BaseType_t xPortStartScheduler( void )

#if ( configASSERT_DEFINED == 1 )
{
volatile uint32_t ulOriginalPriority;
volatile uint8_t ulOriginalPriority;
Copy link
Member

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?

Copy link
Contributor Author

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.

@votrungchi votrungchi closed this by deleting the head repository Apr 3, 2023
@votrungchi votrungchi mentioned this pull request Apr 4, 2023
2 tasks
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.

H G
4 participants