Skip to main content
Visitor II
July 22, 2024
Solved

ethernetif.c File and misra-c:2012 2.3 Issue(?)

In the ethernetif.c file,

typedef enum
{
RX_ALLOC_OK = 0x00,
RX_ALLOC_ERROR = 0x01
} RxAllocStatusTypeDef; // Here, RxAllocStatusTypeDef type is not used.

It says that RxAllocStatusTypeDef is not used, which violates misra-c:2012 2.3.

Inferentially, this would require changing the type in the following code:

[before]

static uint8_t RxAllocStatus;

[after]

static RxAllocStatusTypeDef RxAllocStatus;

It looks like the code should be changed, what do you think?

This topic has been closed for replies.
ASEHSTBest answer
ST Employee
July 22, 2024

Hello @lovewar;,

Thank you for your report and for bringing this to our attention.

Internal ticket number: 187110

 

With Regards,

"If your question is answered, please close this topic by clicking ""Accept as Solution""."

1 reply

ASEHSTBest answer
ST Employee
July 22, 2024

Hello @lovewar;,

Thank you for your report and for bringing this to our attention.

Internal ticket number: 187110

 

With Regards,

"If your question is answered, please close this topic by clicking ""Accept as Solution""."