This is an automated email from the ASF dual-hosted git repository.

hauke pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git

commit 49001982f2509c04de2a02150ee011a2c0a8fdac
Author: Hauke Petersen <hauke.peter...@fu-berlin.de>
AuthorDate: Thu Apr 28 12:23:48 2022 +0200

    porting/os_mbuf: silence Wcast-align warnings
---
 porting/nimble/include/os/os_mbuf.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/porting/nimble/include/os/os_mbuf.h 
b/porting/nimble/include/os/os_mbuf.h
index bee47d0b..6c05b2a7 100644
--- a/porting/nimble/include/os/os_mbuf.h
+++ b/porting/nimble/include/os/os_mbuf.h
@@ -132,12 +132,13 @@ struct os_mqueue {
     ((__om)->om_pkthdr_len >= sizeof (struct os_mbuf_pkthdr))
 
 /** Get a packet header pointer given an mbuf pointer */
-#define OS_MBUF_PKTHDR(__om) ((struct os_mbuf_pkthdr *)     \
-    (void *)((uint8_t *)&(__om)->om_data + sizeof(struct os_mbuf)))
+#define OS_MBUF_PKTHDR(__om) ((struct os_mbuf_pkthdr *)(uintptr_t)  \
+                              (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 *)(void *)((uint8_t *)(__hdr) - sizeof(struct os_mbuf))
+    (struct os_mbuf *)(uintptr_t)((uint8_t *)(__hdr) - sizeof(struct os_mbuf))
 
 /**
  * Gets the length of an entire mbuf chain.  The specified mbuf must have a

Reply via email to