-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Warning fixes. #356
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
Merged
Merged
Warning fixes. #356
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a1503ef
Warning fixes.
kjassmann-renesas 943cc9b
Merge remote-tracking branch 'origin/main' into tasks-timers-warning-fix
kjassmann-renesas c124148
Revert change to tasks.c.
kjassmann-renesas 1cc4d97
Remove all empty definitions of portCLEAN_UP_TCB( pxTCB ) and portALL…
kjassmann-renesas 2d1f575
Use cast to fix warnings.
kjassmann-renesas cf557a1
Coding standard fix.
kjassmann-renesas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -67,9 +67,12 @@ | |||||||||||||||
#endif | ||||||||||||||||
|
||||||||||||||||
/* Bit definitions used in the ucStatus member of a timer structure. */ | ||||||||||||||||
#define tmrSTATUS_IS_ACTIVE ( ( uint8_t ) 0x01 ) | ||||||||||||||||
#define tmrSTATUS_IS_STATICALLY_ALLOCATED ( ( uint8_t ) 0x02 ) | ||||||||||||||||
#define tmrSTATUS_IS_AUTORELOAD ( ( uint8_t ) 0x04 ) | ||||||||||||||||
#define tmrSTATUS_IS_ACTIVE ( ( uint8_t ) 0x01 ) | ||||||||||||||||
#define tmrSTATUS_IS_STATICALLY_ALLOCATED ( ( uint8_t ) 0x02 ) | ||||||||||||||||
#define tmrSTATUS_IS_AUTORELOAD ( ( uint8_t ) 0x04 ) | ||||||||||||||||
#define tmrSTATUS_CLEAR_ACTIVE ( ( uint8_t ) ~0x01 ) | ||||||||||||||||
#define tmrSTATUS_CLEAR_STATICALLY_ALLOCATED ( ( uint8_t ) ~0x02 ) | ||||||||||||||||
#define tmrSTATUS_CLEAR_AUTORELOAD ( ( uint8_t ) ~0x04 ) | ||||||||||||||||
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.
Suggested change
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. The above is just a suggestion if we decide to add new defines. |
||||||||||||||||
|
||||||||||||||||
/* The definition of the timers themselves. */ | ||||||||||||||||
typedef struct tmrTimerControl /* The old naming convention is used to prevent breaking kernel aware debuggers. */ | ||||||||||||||||
|
@@ -462,7 +465,7 @@ | |||||||||||||||
} | ||||||||||||||||
else | ||||||||||||||||
{ | ||||||||||||||||
pxTimer->ucStatus &= ~tmrSTATUS_IS_AUTORELOAD; | ||||||||||||||||
pxTimer->ucStatus &= tmrSTATUS_CLEAR_AUTORELOAD; | ||||||||||||||||
} | ||||||||||||||||
} | ||||||||||||||||
taskEXIT_CRITICAL(); | ||||||||||||||||
|
@@ -550,7 +553,7 @@ | |||||||||||||||
} | ||||||||||||||||
else | ||||||||||||||||
{ | ||||||||||||||||
pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE; | ||||||||||||||||
pxTimer->ucStatus &= tmrSTATUS_CLEAR_ACTIVE; | ||||||||||||||||
} | ||||||||||||||||
|
||||||||||||||||
/* Call the timer callback. */ | ||||||||||||||||
|
@@ -846,7 +849,7 @@ | |||||||||||||||
case tmrCOMMAND_STOP: | ||||||||||||||||
case tmrCOMMAND_STOP_FROM_ISR: | ||||||||||||||||
/* The timer has already been removed from the active list. */ | ||||||||||||||||
pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE; | ||||||||||||||||
pxTimer->ucStatus &= tmrSTATUS_CLEAR_ACTIVE; | ||||||||||||||||
break; | ||||||||||||||||
|
||||||||||||||||
case tmrCOMMAND_CHANGE_PERIOD: | ||||||||||||||||
|
@@ -885,7 +888,7 @@ | |||||||||||||||
* could not have been dynamically allocated. So there is | ||||||||||||||||
* no need to free the memory - just mark the timer as | ||||||||||||||||
* "not active". */ | ||||||||||||||||
pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE; | ||||||||||||||||
pxTimer->ucStatus &= tmrSTATUS_CLEAR_ACTIVE; | ||||||||||||||||
} | ||||||||||||||||
#endif /* configSUPPORT_DYNAMIC_ALLOCATION */ | ||||||||||||||||
break; | ||||||||||||||||
|
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
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.
Thank you for the review.
This won't work because portCLEAN_UP_TCB is defined. It's just defined to nothing.
Perhaps the comment wording could be improved. I'm open to suggestions.
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.
yeah thank you for pointing out. I updated the changes here.
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.
The updated changes also will not work.
portCLEAN_UP_TCB
is defined to nothing, it is not defined to 0.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.
Does this default definition not take care of this? https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/include/FreeRTOS.h#L314
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.
It would, except that
portCLEAN_UP_TCB
is already defined in many ports provided in the repository. Examples:https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33/portmacro.h#L269
https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/portable/IAR/ARM_CM33/non_secure/portmacro.h#L269
I could fix/remove these instances of
portCLEAN_UP_TCB
instead if you prefer.