From d9d24ffe82bc42012d1826f45219c5c03ca1225c Mon Sep 17 00:00:00 2001 From: temi54c1l8 Date: Thu, 13 Jun 2024 12:17:28 +0200 Subject: [PATCH] CO_PDO: static analysis: unsigned integer literal without a 'U' suffix [MISRA 2012 Rule 7.2, required] --- 301/CO_PDO.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/301/CO_PDO.c b/301/CO_PDO.c index d7d52c8..63ffcdc 100644 --- a/301/CO_PDO.c +++ b/301/CO_PDO.c @@ -429,7 +429,7 @@ static ODR_t OD_read_PDO_commParam(OD_stream_t *stream, void *buf, } /* If PDO is not valid, set bit 31 */ - if (!PDO->valid) { COB_ID |= 0x80000000; } + if (!PDO->valid) { COB_ID |= 0x80000000U; } (void)CO_setUint32(buf, COB_ID); } @@ -553,7 +553,7 @@ static ODR_t OD_write_14xx(OD_stream_t *stream, const void *buf, if ((valid != PDO->valid) || (CAN_ID != PDO->configuredCanId)) { /* if default CAN-ID is written, store to OD without Node-ID */ if (CAN_ID == PDO->preDefinedCanId) { - (void)CO_setUint32(bufCopy, COB_ID & 0xFFFFFF80); + (void)CO_setUint32(bufCopy, COB_ID & 0xFFFFFF80U); } if (!valid) { CAN_ID = 0; @@ -984,7 +984,7 @@ static ODR_t OD_write_18xx(OD_stream_t *stream, const void *buf, if ((valid != PDO->valid) || (CAN_ID != PDO->configuredCanId)) { /* if default CAN-ID is written, store to OD without Node-ID */ if (CAN_ID == PDO->preDefinedCanId) { - (void)CO_setUint32(bufCopy, COB_ID & 0xFFFFFF80); + (void)CO_setUint32(bufCopy, COB_ID & 0xFFFFFF80U); } if (!valid) { CAN_ID = 0;