[PATCH rtems-lwip 09/10] FIX incompatible pointer warning

berndmoessner80 at gmail.com berndmoessner80 at gmail.com
Thu Jan 4 00:04:38 UTC 2024


From: Bernd Moessner <berndmoessner80 at gmail.com>

---
 .../contrib/ports/xilinx/netif/xemacpsif.c    | 21 +++++++++++--------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/embeddedsw/ThirdParty/sw_services/lwip211/src/contrib/ports/xilinx/netif/xemacpsif.c b/embeddedsw/ThirdParty/sw_services/lwip211/src/contrib/ports/xilinx/netif/xemacpsif.c
index d0fbd8c..91be52a 100644
--- a/embeddedsw/ThirdParty/sw_services/lwip211/src/contrib/ports/xilinx/netif/xemacpsif.c
+++ b/embeddedsw/ThirdParty/sw_services/lwip211/src/contrib/ports/xilinx/netif/xemacpsif.c
@@ -61,14 +61,16 @@
 
 #if LWIP_IGMP
 static err_t xemacpsif_mac_filter_update (struct netif *netif,
-							ip_addr_t *group, u8_t action);
+							const ip4_addr_t *group,
+							enum netif_mac_filter_action action);
 
 static u8_t xemacps_mcast_entry_mask = 0;
 #endif
 
 #if LWIP_IPV6 && LWIP_IPV6_MLD
 static err_t xemacpsif_mld6_mac_filter_update (struct netif *netif,
-							ip_addr_t *group, u8_t action);
+							const ip6_addr_t *group,
+							enum netif_mac_filter_action action);
 
 static u8_t xemacps_mld6_mcast_entry_mask;
 #endif
@@ -236,7 +238,7 @@ static struct pbuf * low_level_input(struct netif *netif)
  */
 
 static err_t xemacpsif_output(struct netif *netif, struct pbuf *p,
-		const ip_addr_t *ipaddr)
+		const ip4_addr_t *ipaddr)
 {
 	/* resolve hardware address, then send (or queue) packet */
 	return etharp_output(netif, p, (const ip4_addr_t*) ipaddr);
@@ -514,7 +516,7 @@ static u8_t xemacpsif_ip6_addr_ismulticast(ip6_addr_t* ip_addr)
 }
 
 static void xemacpsif_mld6_mac_hash_update (struct netif *netif, u8_t *ip_addr,
-		u8_t action)
+		enum netif_mac_filter_action action)
 {
 	u8_t multicast_mac_addr[6];
 	struct xemac_s *xemac = (struct xemac_s *) (netif->state);
@@ -557,14 +559,15 @@ static void xemacpsif_mld6_mac_hash_update (struct netif *netif, u8_t *ip_addr,
 	SYS_ARCH_UNPROTECT(lev);
 }
 
-static err_t xemacpsif_mld6_mac_filter_update (struct netif *netif, ip_addr_t *group,
-		u8_t action)
+static err_t xemacpsif_mld6_mac_filter_update (struct netif *netif,
+							const ip6_addr_t *group,
+							enum netif_mac_filter_action action)
 {
 	u8_t temp_mask;
 	unsigned int i;
 	u8_t * ip_addr = (u8_t *) group;
 
-	if(!(xemacpsif_ip6_addr_ismulticast((ip6_addr_t*) ip_addr))) {
+	if(!(xemacpsif_ip6_addr_ismulticast( (ip6_addr_t *) group))) {
 		LWIP_DEBUGF(NETIF_DEBUG,
                                 ("%s: The requested MAC address is not a multicast address.\r\n", __func__));								 LWIP_DEBUGF(NETIF_DEBUG,
 		                ("Multicast address add operation failure !!\r\n"));
@@ -664,8 +667,8 @@ static void xemacpsif_mac_hash_update (struct netif *netif, u8_t *ip_addr,
 	SYS_ARCH_UNPROTECT(lev);
 }
 
-static err_t xemacpsif_mac_filter_update (struct netif *netif, ip_addr_t *group,
-		u8_t action)
+static err_t xemacpsif_mac_filter_update (struct netif *netif, ip4_addr_t *group,
+		enum netif_mac_filter_action action)
 {
 	u8_t temp_mask;
 	unsigned int i;
-- 
2.34.1



More information about the devel mailing list