Address MISRA Rule violations (#274)

* Use unsigned types/constants where needed.

* Address MISRA 21.15 violations in FreeRTOS_Sockets.c

* Address MISRA rule violations in code (primarily Rule 2.2)

* Inline had been disabled for Coverity builds, preventing
Coverity from correctly identifying dead code; this change
removes the disabling of inline during Coverity builds.
* Added an explanation for the inline suppression of Rule
11.4 in prvSocketValid().

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
This commit is contained in:
Gary Wicker 2020-09-16 14:53:57 -07:00 committed by GitHub
parent 50dc98a5a6
commit c997d887e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 42 additions and 50 deletions

View file

@ -38,20 +38,6 @@ extern "C" {
#include "FreeRTOSIPConfigDefaults.h"
#include "IPTraceMacroDefaults.h"
#ifdef __COVERITY__
/* Coverity static checks don't like inlined functions.
As it is up to the users to allow inlining, don't let
let Coverity know about it. */
#ifdef portINLINE
/* The usage of #undef violates the rule. */
#undef portINLINE
#endif
#define portINLINE
#endif
/* Some constants defining the sizes of several parts of a packet.
These defines come before inlucding the configuration header files. */
/* The size of the Ethernet header is 14, meaning that 802.1Q VLAN tags