1
0
Fork 0

CO_Emergency: static analysis: cannot assign 'unsigned32' to narrower essential type 'unsigned16' [MISRA 2012 Rule 10.3, required]

This commit is contained in:
temi54c1l8 2024-06-13 10:45:25 +02:00
parent cff7a6f962
commit 266f77df42

View file

@ -441,7 +441,7 @@ CO_ReturnError_t CO_EM_init(CO_EM_t *em,
* to add nodeId of this node to the stored value. */
if (producerCanId == CO_CAN_ID_EMERGENCY) producerCanId += nodeId;
#else
uint32_t producerCanId = CO_CAN_ID_EMERGENCY + nodeId;
uint16_t producerCanId = CO_CAN_ID_EMERGENCY + (uint16_t)nodeId;
em->producerEnabled = (COB_IDEmergency32 & 0x80000000U) == 0U;
em->OD_1014_extension.object = em;