1
0
Fork 0

CO_Emergency: static analysis: side effects on right hand of logical operator, '&&' [MISRA 2012 Rule 13.5, required]

because em->CANtxBuff->bufferFull is volatile
This commit is contained in:
temi54c1l8 2024-06-14 08:56:03 +02:00
parent 35cefe09c3
commit ab26145597

View file

@ -647,7 +647,7 @@ void CO_EM_process(CO_EM_t *em,
) {
em->inhibitEmTimer = 0;
#else
if ((fifoPpPtr != em->fifoWrPtr) && (!em->CANtxBuff->bufferFull)) {
if ((!em->CANtxBuff->bufferFull) && (fifoPpPtr != em->fifoWrPtr)) {
#endif
/* add error register to emergency message */
em->fifo[fifoPpPtr].msg |= (uint32_t) errorRegister << 16;