<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr"><div>This looks good to me.</div><div><br></div><div>Kinsey<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 5, 2024 at 12:50 PM <<a href="mailto:berndmoessner80@gmail.com">berndmoessner80@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">From: Bernd Moessner <<a href="mailto:berndmoessner80@gmail.com" target="_blank">berndmoessner80@gmail.com</a>><br>
<br>
This fix addresses two issues:<br>
<br>
1) Wrong format specifier is used to print a 64bit address pointer<br>
2) The compiler issues a couple of warnings as the Xilinx code omits to cast pointers ip_addr_t to<br>
the required ip4_addr_t or ip6_addr_t tpye.<br>
<br>
Note, ip_addr_t can hold ip4_addr_t and ip6_addr_t. Therefore, the complaints by GCC are correct, but<br>
do not indicate a major bug.<br>
---<br>
.../src/contrib/ports/xilinx/netif/xadapter.c | 13 +++++++++++++<br>
1 file changed, 13 insertions(+)<br>
<br>
diff --git a/embeddedsw/ThirdParty/sw_services/lwip211/src/contrib/ports/xilinx/netif/xadapter.c b/embeddedsw/ThirdParty/sw_services/lwip211/src/contrib/ports/xilinx/netif/xadapter.c<br>
index 9594ff5..93ff148 100644<br>
--- a/embeddedsw/ThirdParty/sw_services/lwip211/src/contrib/ports/xilinx/netif/xadapter.c<br>
+++ b/embeddedsw/ThirdParty/sw_services/lwip211/src/contrib/ports/xilinx/netif/xadapter.c<br>
@@ -171,7 +171,14 @@ xemac_add(struct netif *netif,<br>
#if defined (__arm__) || defined (__aarch64__)<br>
case xemac_type_emacps:<br>
#ifdef XLWIP_CONFIG_INCLUDE_GEM<br>
+#ifndef __rtems__<br>
return netif_add(netif, ipaddr, netmask, gw,<br>
+#else /* __rtems__ */<br>
+ return netif_add( netif,<br>
+ (const ip4_addr_t *) ipaddr,<br>
+ (const ip4_addr_t *) netmask,<br>
+ (const ip4_addr_t *) gw,<br>
+#endif<br>
(void*)mac_baseaddr,<br>
xemacpsif_init,<br>
#if NO_SYS<br>
@@ -184,8 +191,14 @@ xemac_add(struct netif *netif,<br>
#endif<br>
#endif<br>
default:<br>
+#ifndef __rtems__<br>
xil_printf("unable to determine type of EMAC with baseaddress 0x%08x\r\n",<br>
mac_baseaddr);<br>
+#else /* __rtems__ */<br>
+ xil_printf("unable to determine type of EMAC with baseaddress %" PRIXPTR,<br>
+ mac_baseaddr);<br>
+ xil_printf("\r\n");<br>
+#endif<br>
return NULL;<br>
}<br>
}<br>
-- <br>
2.34.1<br>
<br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
</blockquote></div>