From 3d819cb6102851e77537280d38b51a576b397cb3 Mon Sep 17 00:00:00 2001 From: Luigi Rizzo Date: Sat, 2 Nov 2013 18:03:21 +0000 Subject: [PATCH] circumvent a couple of warnings: - on line 2550 intentionally overriding a const qualifier - on line 3219 intentionally converting uint64_t to a pointer --- sys/dev/netmap/netmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/netmap/netmap.c b/sys/dev/netmap/netmap.c index 160aedf8be9e..18471d515fe3 100644 --- a/sys/dev/netmap/netmap.c +++ b/sys/dev/netmap/netmap.c @@ -2547,7 +2547,7 @@ netmap_ioctl(struct cdev *dev, u_long cmd, caddr_t data, } if (memflags & NETMAP_MEM_PRIVATE) { nmr->nr_ringid |= NETMAP_PRIV_MEM; - *(uint32_t *)&nifp->ni_flags |= NI_PRIV_MEM; + *(uint32_t *)(uintptr_t)&nifp->ni_flags |= NI_PRIV_MEM; } nmr->nr_offset = netmap_mem_if_offset(na->nm_mem, nifp); } while (0); @@ -3216,7 +3216,7 @@ nm_bdg_preflush(struct netmap_adapter *na, u_int ring_nr, /* this slot goes into a list so initialize the link field */ ft[ft_i].ft_next = NM_FT_NULL; buf = ft[ft_i].ft_buf = (slot->flags & NS_INDIRECT) ? - (void *)slot->ptr : BDG_NMB(na->nm_mem, slot); + (void *)(uintptr_t)slot->ptr : BDG_NMB(na->nm_mem, slot); prefetch(buf); ++ft_i; if (slot->flags & NS_MOREFRAG) {