svn commit: r249538 - head/sys/kern

Konstantin Belousov kib at FreeBSD.org
Tue Apr 16 07:11:53 UTC 2013


Author: kib
Date: Tue Apr 16 07:11:52 2013
New Revision: 249538
URL: http://svnweb.freebsd.org/changeset/base/249538

Log:
  Some compilers issue a warning when wider integer is casted to narrow
  pointer.  Supposedly shut down the warning by casting through
  uintptr_t.
  
  Reported by:	ian

Modified:
  head/sys/kern/subr_bus_dma.c

Modified: head/sys/kern/subr_bus_dma.c
==============================================================================
--- head/sys/kern/subr_bus_dma.c	Tue Apr 16 07:02:13 2013	(r249537)
+++ head/sys/kern/subr_bus_dma.c	Tue Apr 16 07:11:52 2013	(r249538)
@@ -66,8 +66,8 @@ _bus_dmamap_load_vlist(bus_dma_tag_t dma
 	error = 0;
 	for (; sglist_cnt > 0; sglist_cnt--, list++) {
 		error = _bus_dmamap_load_buffer(dmat, map,
-		    (void *)list->ds_addr, list->ds_len, pmap, flags, NULL,
-		    nsegs);
+		    (void *)(uintptr_t)list->ds_addr, list->ds_len, pmap,
+		    flags, NULL, nsegs);
 		if (error)
 			break;
 	}


More information about the svn-src-head mailing list