1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

pkg/semtech-loramac: allow pointer <-> function pointer cast

Building on native reveals

    error: ISO C forbids initialization between function pointer and ‘void *’

Let's disable that.
This commit is contained in:
Benjamin Valentin 2020-07-21 23:03:02 +02:00
parent 7e6fee8260
commit e3fd43861c
2 changed files with 2 additions and 2 deletions

View File

@ -609,7 +609,7 @@ void *_semtech_loramac_event_loop(void *arg)
case MSG_TYPE_MAC_TIMEOUT:
{
DEBUG("[semtech-loramac] MAC timer timeout\n");
void (*callback)(void) = msg.content.ptr;
void (*callback)(void) = (void (*)(void))(uintptr_t)msg.content.value;
callback();
break;
}

View File

@ -44,7 +44,7 @@ void TimerStart(TimerEvent_t *obj)
xtimer_t *timer = &(obj->dev);
msg_t *msg = &(obj->msg);
msg->type = MSG_TYPE_MAC_TIMEOUT;
msg->content.ptr = obj->cb;
msg->content.value = (uintptr_t)obj->cb;
xtimer_set_msg(timer, obj->timeout, msg, semtech_loramac_pid);
}