| 2211 | /*-----------------------------------------------------------*/ |
| 2212 | |
| 2213 | static void prvCopyDataFromQueue( Queue_t * const pxQueue, |
| 2214 | void * const pvBuffer ) |
| 2215 | { |
| 2216 | if( pxQueue->uxItemSize != ( UBaseType_t ) 0 ) |
| 2217 | { |
| 2218 | pxQueue->u.xQueue.pcReadFrom += pxQueue->uxItemSize; /*lint !e9016 Pointer arithmetic on char types ok, especially in this use case where it is the clearest way of conveying intent. */ |
| 2219 | |
| 2220 | if( pxQueue->u.xQueue.pcReadFrom >= pxQueue->u.xQueue.pcTail ) /*lint !e946 MISRA exception justified as use of the relational operator is the cleanest solutions. */ |
| 2221 | { |
| 2222 | pxQueue->u.xQueue.pcReadFrom = pxQueue->pcHead; |
| 2223 | } |
| 2224 | else |
| 2225 | { |
| 2226 | mtCOVERAGE_TEST_MARKER(); |
| 2227 | } |
| 2228 | |
| 2229 | ( void ) memcpy( ( void * ) pvBuffer, ( void * ) pxQueue->u.xQueue.pcReadFrom, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 !e418 !e9087 MISRA exception as the casts are only redundant for some ports. Also previous logic ensures a null pointer can only be passed to memcpy() when the count is 0. Cast to void required by function signature and safe as no alignment requirement and copy length specified in bytes. */ |
| 2230 | } |
| 2231 | } |
| 2232 | /*-----------------------------------------------------------*/ |
| 2233 | |
| 2234 | static void prvUnlockQueue( Queue_t * const pxQueue ) |
no outgoing calls
no test coverage detected