Fix cmake example errors (#1037)

Add typecasts to prevent compiler warnings. Remove ULL suffix to adhere
to C90.
This commit is contained in:
Rahul Kar 2024-04-18 19:08:51 +05:30 committed by GitHub
parent e143832ad4
commit bbc058967b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 51 additions and 50 deletions

6
list.c
View file

@ -130,7 +130,7 @@ void vListInsertEnd( List_t * const pxList,
/* Remember which list the item is in. */
pxNewListItem->pxContainer = pxList;
( pxList->uxNumberOfItems ) += ( UBaseType_t ) 1U;
( pxList->uxNumberOfItems ) = ( UBaseType_t ) ( pxList->uxNumberOfItems + 1U );
traceRETURN_vListInsertEnd();
}
@ -205,7 +205,7 @@ void vListInsert( List_t * const pxList,
* item later. */
pxNewListItem->pxContainer = pxList;
( pxList->uxNumberOfItems ) += ( UBaseType_t ) 1U;
( pxList->uxNumberOfItems ) = ( UBaseType_t ) ( pxList->uxNumberOfItems + 1U );
traceRETURN_vListInsert();
}
@ -237,7 +237,7 @@ UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove )
}
pxItemToRemove->pxContainer = NULL;
( pxList->uxNumberOfItems ) -= ( UBaseType_t ) 1U;
( pxList->uxNumberOfItems ) = ( UBaseType_t ) ( pxList->uxNumberOfItems - 1U );
traceRETURN_uxListRemove( pxList->uxNumberOfItems );