Skip to content

Commit e084865

Browse files
committed
Fix comparison warning on STM32L4 devices
Cast the pointer used in l4_retarget to uint32_t before comparing it to fix the warning: "comparison between pointer and integer"
1 parent e2d003a commit e084865

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

targets/TARGET_STM/TARGET_STM32L4/l4_retarget.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void *__wrap__sbrk(int incr)
5151
uint32_t heap_ind_old = heap_ind;
5252
uint32_t heap_ind_new = heap_ind_old + incr;
5353

54-
if (heap_ind_new > &__mbed_krbs_start) {
54+
if (heap_ind_new > (uint32_t)&__mbed_krbs_start) {
5555
errno = ENOMEM;
5656
return (void *) - 1;
5757
}

0 commit comments

Comments
 (0)