Fix build of ndis with base gcc on i386

Casting from rman_res_t to a pointer results in "cast to pointer from
integer of different size" warnings with base gcc on i386, so use an
intermediate cast to uintptr_t to suppress it.  In this case, the I/O
port range is effectively limited to the range of 0..65535.

Reviewed by:	imp
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D15746
This commit is contained in:
Dimitry Andric 2018-06-17 19:24:40 +00:00
parent a1e2190c98
commit 5494dcfa1c

View File

@ -1287,7 +1287,7 @@ NdisMRegisterIoPortRange(offset, adapter, port, numports)
if (rman_get_size(sc->ndis_res_io) < numports)
return (NDIS_STATUS_INVALID_LENGTH);
*offset = (void *)rman_get_start(sc->ndis_res_io);
*offset = (void *)(uintptr_t)rman_get_start(sc->ndis_res_io);
return (NDIS_STATUS_SUCCESS);
}