native: fix warning errors freebsd#3390
Conversation
cpu/native/native_cpu.c
Outdated
There was a problem hiding this comment.
This is defined as void *ss_sp; on Linux, this cast may introduce additional warnings about alignment. Any ideas?
Do we need an ifdef?
There was a problem hiding this comment.
Hm, would guess #ifdef it is then.
There was a problem hiding this comment.
normally you can cast void * pointers from and to anything... That's the point of void * pointers: being generic.
There was a problem hiding this comment.
Also keep to the coding conventions: (char *)stk;
There was a problem hiding this comment.
After looking through the code some more I think that stk should be changed into a void *
Edit: ... or a char *, whatever works best
There was a problem hiding this comment.
@authmillenon The problem is, on FreeBSD it is not a void * but char * pointer.
|
updated addressing comments. |
|
@thomaseichinger how about changing the stk variable into a |
c220bd2 to
d39ab04
Compare
|
@authmillenon could you check these commits tackle the warnings we talked about? |
|
Yes, they are. |
d39ab04 to
2052c2c
Compare
2052c2c to
cbc9ddc
Compare
|
@gebart I adapted |
|
I'm assuming that the nativespontop is something that have been an experiment with upward growing stack. |
|
I have some ideas for a refactoring with creating stack arrays as unsigned long instead in order to get rid of some Wextra warnings,but that is outside of the scope of this PR. |
|
ACK, go after Travis is fine and @LudwigOrtmann has had the opportunity to respond to the question by @thomaseichinger |
…reebsd native: fix warning errors freebsd
|
Got the ok of @LudwigOrtmann on a side channel. |
| char *thread_stack_init(thread_task_func_t task_func, void *arg, void *stack_start, int stacksize) | ||
| { | ||
| unsigned int *stk; | ||
| char *stk; |
There was a problem hiding this comment.
This broke native running on arm.
Fixes warnings on FreeBSD which became errors in #3319.