Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Nov 2013 18:03:21 +0000 (UTC)
From:      Luigi Rizzo <luigi@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r257550 - head/sys/dev/netmap
Message-ID:  <201311021803.rA2I3LNF082802@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: luigi
Date: Sat Nov  2 18:03:21 2013
New Revision: 257550
URL: http://svnweb.freebsd.org/changeset/base/257550

Log:
  circumvent a couple of warnings:
  - on line 2550 intentionally overriding a const qualifier
  - on line 3219 intentionally converting uint64_t to a pointer

Modified:
  head/sys/dev/netmap/netmap.c

Modified: head/sys/dev/netmap/netmap.c
==============================================================================
--- head/sys/dev/netmap/netmap.c	Sat Nov  2 17:08:20 2013	(r257549)
+++ head/sys/dev/netmap/netmap.c	Sat Nov  2 18:03:21 2013	(r257550)
@@ -2547,7 +2547,7 @@ netmap_ioctl(struct cdev *dev, u_long cm
 			}
 			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 *n
 		/* 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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311021803.rA2I3LNF082802>