|
93 | 93 | #endif /* configUSE_TCP_WIN */
|
94 | 94 | /*-----------------------------------------------------------*/
|
95 | 95 |
|
96 |
| - static void vListInsertGeneric( List_t * const pxList, |
97 |
| - ListItem_t * const pxNewListItem, |
98 |
| - MiniListItem_t * pxWhere ); |
| 96 | + #if ( ipconfigUSE_TCP_WIN == 1 ) |
| 97 | + static void vListInsertGeneric( List_t * const pxList, |
| 98 | + ListItem_t * const pxNewListItem, |
| 99 | + MiniListItem_t * pxWhere ); |
| 100 | + #endif |
99 | 101 |
|
100 | 102 | /*
|
101 | 103 | * All TCP sockets share a pool of segment descriptors (TCPSegment_t)
|
|
383 | 385 | * @param[in] pxNewListItem The item to be inserted.
|
384 | 386 | * @param[in] pxWhere Where should the item be inserted.
|
385 | 387 | */
|
386 |
| - static void vListInsertGeneric( List_t * const pxList, |
387 |
| - ListItem_t * const pxNewListItem, |
388 |
| - MiniListItem_t * pxWhere ) |
389 |
| - { |
390 |
| - /* Insert a new list item into pxList, it does not sort the list, |
391 |
| - * but it puts the item just before xListEnd, so it will be the last item |
392 |
| - * returned by listGET_HEAD_ENTRY() */ |
| 388 | + #if ( ipconfigUSE_TCP_WIN == 1 ) |
| 389 | + static void vListInsertGeneric( List_t * const pxList, |
| 390 | + ListItem_t * const pxNewListItem, |
| 391 | + MiniListItem_t * pxWhere ) |
| 392 | + { |
| 393 | + /* Insert a new list item into pxList, it does not sort the list, |
| 394 | + * but it puts the item just before xListEnd, so it will be the last item |
| 395 | + * returned by listGET_HEAD_ENTRY() */ |
393 | 396 |
|
394 |
| - /* MISRA Ref 11.3.1 [Misaligned access] */ |
395 |
| -/* More details at: https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/main/MISRA.md#rule-113 */ |
396 |
| - /* coverity[misra_c_2012_rule_11_3_violation] */ |
397 |
| - pxNewListItem->pxNext = ( ( ListItem_t * ) pxWhere ); |
| 397 | + /* MISRA Ref 11.3.1 [Misaligned access] */ |
| 398 | + /* More details at: https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/main/MISRA.md#rule-113 */ |
| 399 | + /* coverity[misra_c_2012_rule_11_3_violation] */ |
| 400 | + pxNewListItem->pxNext = ( ( ListItem_t * ) pxWhere ); |
398 | 401 |
|
399 |
| - pxNewListItem->pxPrevious = pxWhere->pxPrevious; |
400 |
| - pxWhere->pxPrevious->pxNext = pxNewListItem; |
401 |
| - pxWhere->pxPrevious = pxNewListItem; |
| 402 | + pxNewListItem->pxPrevious = pxWhere->pxPrevious; |
| 403 | + pxWhere->pxPrevious->pxNext = pxNewListItem; |
| 404 | + pxWhere->pxPrevious = pxNewListItem; |
402 | 405 |
|
403 |
| - /* Remember which list the item is in. */ |
404 |
| - listLIST_ITEM_CONTAINER( pxNewListItem ) = ( struct xLIST * configLIST_VOLATILE ) pxList; |
| 406 | + /* Remember which list the item is in. */ |
| 407 | + listLIST_ITEM_CONTAINER( pxNewListItem ) = ( struct xLIST * configLIST_VOLATILE ) pxList; |
405 | 408 |
|
406 |
| - ( pxList->uxNumberOfItems )++; |
407 |
| - } |
| 409 | + ( pxList->uxNumberOfItems )++; |
| 410 | + } |
| 411 | + #endif /* if ( ipconfigUSE_TCP_WIN == 1 ) */ |
408 | 412 | /*-----------------------------------------------------------*/
|
409 | 413 |
|
410 | 414 | #if ( ipconfigUSE_TCP_WIN == 1 )
|
|
0 commit comments