Skip to content

Conversation

@moninom1
Copy link
Member

@moninom1 moninom1 commented Nov 28, 2023

Description

Fix following MISRA issues :

  1. MISRA Rule 8_5 : Symbol "FreeRTOS_inet_ntop6" is declared more than once.
  2. MISRA Rule 8_9 : Symbol "FreeRTOS_in6addr_loopback" should be defined at block scope.
  3. MISRA Rule 8_8 : missing static storage modifier for "prvCloseDHCPSocket" which has internal linkage.
  4. MISRA Rule 9_1 : Using uninitialized value "xRemoteIP.xIs_IPv6" when calling "pxTCPSocketLookup".
  5. MISRA Rule 9_1 : Using uninitialized value "pxAddress->sin_family" when calling "prvSocketBindAdd".
  6. MISRA Rule 11_3 : A cast shall not be performed between two pointer of different object type.
  7. MISRA Rule 12_1 : Missing parentheses on sub-expression of the operator.
  8. MISRA Rule 14.4 : The condition expression 0 does not have an essentially boolean type
  9. MISRA Rule 15_6 : The body of the "then" branch of the "if" statement is not a compound statement.
  10. MISRA Rule 17_7 : The return value of a non-void function "memset" is unused.
  11. MISRA Rule 20_5 : Using "#undef".
  12. MISRA Rule 20_10 : Use of "#" or "##" preprocessor operator.
  13. MISRA Rule 21_1 : Defining or undefining a reserved name "_static", which is an identifier or macro name beginning with an underscore.
  14. MISRA Rule 21_15 : Calling function "memcmp" with incompatible types "void " and "uint8_t const ()[6]".

Test Steps

Coverity Test cases with cov-analysis-linux64-2023.6.1 version.

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

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

@moninom1 moninom1 requested a review from a team as a code owner November 28, 2023 07:15
@moninom1
Copy link
Member Author

/bot run formatting

ActoryOu
ActoryOu previously approved these changes Nov 30, 2023
Copy link
Contributor

@htibosch htibosch left a comment

Choose a reason for hiding this comment

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

Thank you for these MISRA changes. I only had 3 minor remarks. Most importantly: shall we remove FreeRTOS_flush_logging()?

Copy link
Contributor

@htibosch htibosch left a comment

Choose a reason for hiding this comment

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

@moninom1, I think nobody will miss the function FreeRTOS_flush_logging(). But it doesn't bother neither.

Thanks for this PR

ActoryOu
ActoryOu previously approved these changes Dec 4, 2023
tony-josi-aws
tony-josi-aws previously approved these changes Dec 4, 2023
Copy link
Member

@AniruddhaKanhere AniruddhaKanhere left a comment

Choose a reason for hiding this comment

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

Approved with a minor comment

@moninom1 moninom1 merged commit c8d98d4 into FreeRTOS:main Dec 8, 2023
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.

6 participants