1
0
Fork 0

CO_Emergency: static analysis: cannot assign a composite expression of type 'unsigned8' to an object of wider type 'unsigned32' [MISRA 2012 Rule 10.6, required]

This commit is contained in:
temi54c1l8 2024-06-13 10:43:49 +02:00
parent 926dc62873
commit cff7a6f962

View file

@ -138,7 +138,7 @@ static ODR_t OD_read_1014_default(OD_stream_t *stream, void *buf,
CO_EM_t *em = (CO_EM_t *)stream->object;
uint32_t COB_IDEmergency32 = em->producerEnabled ? 0U : 0x80000000U;
COB_IDEmergency32 |= CO_CAN_ID_EMERGENCY + em->nodeId;
COB_IDEmergency32 |= CO_CAN_ID_EMERGENCY + (uint32_t)em->nodeId;
(void)CO_setUint32(buf, COB_IDEmergency32);
*countRead = sizeof(uint32_t);