Skip to content

coru_platform [ARM]: fix for Wincompatible-pointer-types warning#4

Open
maximevince wants to merge 1 commit intogeky:masterfrom
maximevince:master
Open

coru_platform [ARM]: fix for Wincompatible-pointer-types warning#4
maximevince wants to merge 1 commit intogeky:masterfrom
maximevince:master

Conversation

@maximevince
Copy link

@maximevince maximevince commented Jan 5, 2021

Hi geky,

I have found one of your other nice little projects :)

I propose a small fix in this pull request, since I noticed that my ARM GCC compiler was generating the following warning:

../../../libs/coru/coru_platform.c: In function 'coru_plat_init':                                                                                                                                                                                                               
../../../libs/coru/coru_platform.c:159:14: warning: assignment to 'uintptr_t *' {aka 'unsigned int *'} from incompatible pointer type 'uint32_t *' {aka 'long unsigned int *'} [-Wincompatible-pointer-types]                                                                   
  159 |     *pcanary = &sp[-size/sizeof(uint32_t)];                                                                                                                                                                                                                             
      |              ^                                           

The warning should be harmless, since it's only converting between pointers to a long unsigned integer on the one hand and an unsigned integer on the other hand, but I figured you might want to have this warning fixed anyway.

@geky
Copy link
Owner

geky commented Jan 6, 2021

Looks good to me, thanks for this!

Hmm, I'm not sure why CI is failing, it looks unrelated (I arm-none-eabi-gcc was updated?). I will fix that first and then bring this in.

@BartThoen
Copy link

Any update on this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants