From a5004f46495c7f60236e58116b845c93ea410755 Mon Sep 17 00:00:00 2001 From: temi54c1l8 Date: Wed, 26 Jun 2024 13:14:11 +0200 Subject: [PATCH] CO_fifo: static analysis: result of assignment operator used in right operand to '=' operator [MISRA 2012 Rule 13.4, advisory] --- 301/CO_fifo.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/301/CO_fifo.c b/301/CO_fifo.c index ce7352b..d0a9af3 100644 --- a/301/CO_fifo.c +++ b/301/CO_fifo.c @@ -1168,7 +1168,8 @@ size_t CO_fifo_cpyTok2Hex(CO_fifo_t *dest, CO_fifo_t *src, uint8_t *status) { } /* get free space of the dest fifo */ - destSpaceStart = destSpace = CO_fifo_getSpace(dest); + destSpaceStart = CO_fifo_getSpace(dest); + destSpace = destSpaceStart; /* is this the first write into dest? */ if (!dest->started) { @@ -1279,7 +1280,8 @@ size_t CO_fifo_cpyTok2Vs(CO_fifo_t *dest, CO_fifo_t *src, uint8_t *status) { } /* get free space of the dest fifo */ - destSpaceStart = destSpace = CO_fifo_getSpace(dest); + destSpaceStart = CO_fifo_getSpace(dest); + destSpace = destSpaceStart; /* is this the first write into dest? */ if (!dest->started) { @@ -1442,7 +1444,8 @@ size_t CO_fifo_cpyTok2B64(CO_fifo_t *dest, CO_fifo_t *src, uint8_t *status) { } /* get free space of the dest fifo */ - destSpaceStart = destSpace = CO_fifo_getSpace(dest); + destSpaceStart = CO_fifo_getSpace(dest); + destSpace = destSpaceStart; /* is this the first write into dest? */ if (!dest->started) {