1
0
Fork 0

CO_SYNC: 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 13:44:11 +02:00
parent 99b56d10c9
commit 64934d7903

View file

@ -308,7 +308,7 @@ CO_ReturnError_t CO_SYNC_init(CO_SYNC_t *SYNC,
SYNC->isProducer = (cobIdSync & 0x40000000U) != 0U;
#endif
#if ((CO_CONFIG_SYNC) & CO_CONFIG_FLAG_OD_DYNAMIC) != 0
SYNC->CAN_ID = cobIdSync & 0x7FFU;
SYNC->CAN_ID = (uint16_t)(cobIdSync & 0x7FFU);
SYNC->CANdevRx = CANdevRx;
SYNC->CANdevRxIdx = CANdevRxIdx;
#if ((CO_CONFIG_SYNC) & CO_CONFIG_SYNC_PRODUCER) != 0
@ -321,7 +321,7 @@ CO_ReturnError_t CO_SYNC_init(CO_SYNC_t *SYNC,
CO_ReturnError_t ret = CO_CANrxBufferInit(
CANdevRx, /* CAN device */
CANdevRxIdx, /* rx buffer index */
cobIdSync & 0x7FFU, /* CAN identifier */
(uint16_t)(cobIdSync & 0x7FFU), /* CAN identifier */
0x7FF, /* mask */
false, /* rtr */
(void*)SYNC, /* object passed to receive function */