File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -260,6 +260,7 @@ target_compile_options(freertos_kernel PRIVATE
260
260
$< $< COMPILE_LANG_AND_ID:C,Clang,GNU> :-Wextra>
261
261
$< $< COMPILE_LANG_AND_ID:C,Clang,GNU> :-Wpedantic>
262
262
$< $< COMPILE_LANG_AND_ID:C,Clang,GNU> :-Werror>
263
+ $< $< COMPILE_LANG_AND_ID:C,Clang,GNU> :-Wconversion>
263
264
$< $< COMPILE_LANG_AND_ID:C,Clang> :-Weverything>
264
265
265
266
# Suppressions required to build clean with clang.
Original file line number Diff line number Diff line change @@ -421,7 +421,7 @@ static void prvHeapInit( void ) /* PRIVILEGED_FUNCTION */
421
421
/* pxEnd is used to mark the end of the list of free blocks and is inserted
422
422
* at the end of the heap space. */
423
423
uxAddress = ( portPOINTER_SIZE_TYPE ) ( pucAlignedHeap + xTotalHeapSize );
424
- uxAddress -= xHeapStructSize ;
424
+ uxAddress -= ( portPOINTER_SIZE_TYPE ) xHeapStructSize ;
425
425
uxAddress &= ~( ( portPOINTER_SIZE_TYPE ) portBYTE_ALIGNMENT_MASK );
426
426
pxEnd = ( BlockLink_t * ) uxAddress ;
427
427
pxEnd -> xBlockSize = 0 ;
Original file line number Diff line number Diff line change @@ -508,7 +508,7 @@ void vPortDefineHeapRegions( const HeapRegion_t * const pxHeapRegions )
508
508
configASSERT ( pxEnd != NULL );
509
509
510
510
/* Check blocks are passed in with increasing start addresses. */
511
- configASSERT ( xAddress > ( size_t ) pxEnd );
511
+ configASSERT ( ( size_t ) xAddress > ( size_t ) pxEnd );
512
512
}
513
513
514
514
/* Remember the location of the end marker in the previous region, if
@@ -517,9 +517,9 @@ void vPortDefineHeapRegions( const HeapRegion_t * const pxHeapRegions )
517
517
518
518
/* pxEnd is used to mark the end of the list of free blocks and is
519
519
* inserted at the end of the region space. */
520
- xAddress = xAlignedHeap + xTotalRegionSize ;
521
- xAddress -= xHeapStructSize ;
522
- xAddress &= ~( ( size_t ) portBYTE_ALIGNMENT_MASK );
520
+ xAddress = xAlignedHeap + ( portPOINTER_SIZE_TYPE ) xTotalRegionSize ;
521
+ xAddress -= ( portPOINTER_SIZE_TYPE ) xHeapStructSize ;
522
+ xAddress &= ~( ( portPOINTER_SIZE_TYPE ) portBYTE_ALIGNMENT_MASK );
523
523
pxEnd = ( BlockLink_t * ) xAddress ;
524
524
pxEnd -> xBlockSize = 0 ;
525
525
pxEnd -> pxNextFreeBlock = NULL ;
You can’t perform that action at this time.
0 commit comments