From 7e1c1d30203733161a787736c569b1fb1b5bd1b6 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Tue, 21 Jun 2022 23:23:02 -0400 Subject: [PATCH] openbsd_network: Adjust reference-taking in bus_dmamap_load_mbuf. dm_segs is a flexible-length array at the end of a structure. Taking its address with & gives the same address as using it without, however, the types are not identical in the different cases. This should fix some warnings about incompatibile pointer types while not changing behavior. --- src/libs/compat/openbsd_network/compat/machine/bus.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/compat/openbsd_network/compat/machine/bus.h b/src/libs/compat/openbsd_network/compat/machine/bus.h index a0a10b1d89..5b430c1af8 100644 --- a/src/libs/compat/openbsd_network/compat/machine/bus.h +++ b/src/libs/compat/openbsd_network/compat/machine/bus.h @@ -84,7 +84,7 @@ static int bus_dmamap_load_mbuf_obsd(bus_dma_tag_t tag, bus_dmamap_t dmam, struct mbuf *chain, int flags) { return bus_dmamap_load_mbuf_sg(dmam->_dmat, dmam->_dmamp, chain, - &dmam->dm_segs, &dmam->dm_nsegs, flags); + dmam->dm_segs, &dmam->dm_nsegs, flags); } #define bus_dmamap_load_mbuf bus_dmamap_load_mbuf_obsd