Skip to content

Conversation

@chinglee-iot
Copy link
Member

@chinglee-iot chinglee-iot commented Oct 5, 2023

Description

  • Move trace macro after declaration to comply with ISO C90

Test Steps

Before this PR

/mnt/c/msys64/home/chinglee/kernel/init_review/test/FreeRTOS/FreeRTOS/Source/tasks.c: In function ‘vTaskPrioritySet’:
/mnt/c/msys64/home/chinglee/kernel/init_review/test/FreeRTOS/FreeRTOS/Source/tasks.c:2468:13: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
 2468 |             BaseType_t xYieldForTask = pdFALSE;
      |             ^~~~~~~~~~
/mnt/c/msys64/home/chinglee/kernel/init_review/test/FreeRTOS/FreeRTOS/Source/tasks.c: In function ‘xTaskIncrementTick’:
/mnt/c/msys64/home/chinglee/kernel/init_review/test/FreeRTOS/FreeRTOS/Source/tasks.c:4382:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
 4382 |     BaseType_t xYieldRequiredForCore[ configNUMBER_OF_CORES ] = { pdFALSE };
      |     ^~~~~~~~~~
/mnt/c/msys64/home/chinglee/kernel/init_review/test/FreeRTOS/FreeRTOS/Source/tasks.c: In function ‘eTaskConfirmSleepModeStatus’:
/mnt/c/msys64/home/chinglee/kernel/init_review/test/FreeRTOS/FreeRTOS/Source/tasks.c:5571:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
 5571 |         eSleepModeStatus eReturn = eStandardSleep;

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

#786

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

* Move trace macro after delcaration to comply with ISO C90
@chinglee-iot chinglee-iot requested a review from a team as a code owner October 5, 2023 05:25
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 5, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented Oct 5, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (30e13da) 93.62% compared to head (8055102) 93.62%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #820   +/-   ##
=======================================
  Coverage   93.62%   93.62%           
=======================================
  Files           6        6           
  Lines        2508     2508           
  Branches      598      598           
=======================================
  Hits         2348     2348           
  Misses        107      107           
  Partials       53       53           
Flag Coverage Δ
unittests 93.62% <ø> (ø)

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

Files Coverage Δ
tasks.c 94.81% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@chinglee-iot chinglee-iot merged commit 317bc0c into FreeRTOS:main Oct 5, 2023
@chinglee-iot chinglee-iot deleted the move-tracemacro-after-declaration branch October 5, 2023 06:46
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.

3 participants