CO_Emergency: static analysis: cannot assign 'unsigned32' to narrower essential type 'unsigned16' [MISRA 2012 Rule 10.3, required]
This commit is contained in:
parent
cff7a6f962
commit
266f77df42
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue