porting: Allow to build with -Wcast-align

It is expected that mbuf structures are properly aligned so we
can just cast to void pointer here and silence warning.
This commit is contained in:
Szymon Janc
2021-12-07 13:52:10 +01:00
parent bc142016bd
commit 6b40986a1f
+2 -2
View File
@@ -133,11 +133,11 @@ struct os_mqueue {
/** Get a packet header pointer given an mbuf pointer */
#define OS_MBUF_PKTHDR(__om) ((struct os_mbuf_pkthdr *) \
((uint8_t *)&(__om)->om_data + sizeof(struct os_mbuf)))
(void *)((uint8_t *)&(__om)->om_data + sizeof(struct os_mbuf)))
/** Given a mbuf packet header pointer, return a pointer to the mbuf */
#define OS_MBUF_PKTHDR_TO_MBUF(__hdr) \
(struct os_mbuf *)((uint8_t *)(__hdr) - sizeof(struct os_mbuf))
(struct os_mbuf *)(void *)((uint8_t *)(__hdr) - sizeof(struct os_mbuf))
/**
* Gets the length of an entire mbuf chain. The specified mbuf must have a