mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-16 09:47:44 -04:00
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:
parent
50dc98a5a6
commit
c997d887e0
3 changed files with 42 additions and 50 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue