diff options
author | Bernd Moessner <berndmoessner80@gmail.com> | 2024-01-05 19:39:55 +0100 |
---|---|---|
committer | Joel Sherrill <joel@rtems.org> | 2024-01-05 20:12:02 -0600 |
commit | 065ed8f2ed21b9fc06b787e9987c2927aeeb1285 (patch) | |
tree | 11bbfa809f75e603a07c2109b4001b026bf44dd2 | |
parent | defs: Remove obsoleted headers (diff) | |
download | rtems-lwip-065ed8f2ed21b9fc06b787e9987c2927aeeb1285.tar.bz2 |
xadapter: fix compiler warnings
This fix addresses two issues:
1) Wrong format specifier is used to print a 64bit address pointer
2) The compiler issues a couple of warnings as the Xilinx code omits to cast pointers ip_addr_t to
the required ip4_addr_t or ip6_addr_t tpye.
Note, ip_addr_t can hold ip4_addr_t and ip6_addr_t. Therefore, the complaints by GCC are correct, but
do not indicate a major bug.
-rw-r--r-- | embeddedsw/ThirdParty/sw_services/lwip211/src/contrib/ports/xilinx/netif/xadapter.c | 13 |
1 files changed, 13 insertions, 0 deletions
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 index 9594ff5..93ff148 100644 --- 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 @@ -171,7 +171,14 @@ xemac_add(struct netif *netif, #if defined (__arm__) || defined (__aarch64__) case xemac_type_emacps: #ifdef XLWIP_CONFIG_INCLUDE_GEM +#ifndef __rtems__ return netif_add(netif, ipaddr, netmask, gw, +#else /* __rtems__ */ + return netif_add( netif, + (const ip4_addr_t *) ipaddr, + (const ip4_addr_t *) netmask, + (const ip4_addr_t *) gw, +#endif (void*)mac_baseaddr, xemacpsif_init, #if NO_SYS @@ -184,8 +191,14 @@ xemac_add(struct netif *netif, #endif #endif default: +#ifndef __rtems__ xil_printf("unable to determine type of EMAC with baseaddress 0x%08x\r\n", mac_baseaddr); +#else /* __rtems__ */ + xil_printf("unable to determine type of EMAC with baseaddress %" PRIXPTR, + mac_baseaddr); + xil_printf("\r\n"); +#endif return NULL; } } |