mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-27 08:55:51 +08:00
[sd_log] Fix compiler warning
This commit is contained in:
@@ -76,9 +76,11 @@ int32_t msgqueue_send(MsgQueue *que, void *msg, const uint16_t msgLen,
|
||||
int32_t msgqueue_send_timeout(MsgQueue *que, void *msg, const uint16_t msgLen,
|
||||
const MsgQueueUrgency urgency, const systime_t timout)
|
||||
{
|
||||
const MsgPtrLen mpl = {.ptrOfst = (uint32_t) msg - (uint32_t) tlsf_get_heap_addr(&MSGQ_HEAP),
|
||||
.len = msgLen
|
||||
};
|
||||
// this code prevents compiler warning about a missing initializer of mpl
|
||||
MsgPtrLen m;
|
||||
m.len = msgLen;
|
||||
m.ptrOfst = (uint32_t) msg - (uint32_t) tlsf_get_heap_addr(&MSGQ_HEAP);
|
||||
const MsgPtrLen mpl = m;
|
||||
|
||||
#if CH_DBG_ENABLE_CHECKS
|
||||
if (((uint32_t) msg < (uint32_t) tlsf_get_heap_addr(&MSGQ_HEAP)) ||
|
||||
|
||||
Reference in New Issue
Block a user