git: e7236a7ddf37 - main - xen: plug some of set-but-not-used vars
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 15 Dec 2021 13:46:21 UTC
The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=e7236a7ddf37ffe330d323c7b6037230d10afee4 commit e7236a7ddf37ffe330d323c7b6037230d10afee4 Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2021-12-15 13:45:04 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2021-12-15 13:46:17 +0000 xen: plug some of set-but-not-used vars Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/dev/xen/balloon/balloon.c | 4 ++-- sys/dev/xen/blkback/blkback.c | 4 +--- sys/dev/xen/console/xen_console.c | 2 +- sys/dev/xen/netback/netback.c | 2 +- sys/dev/xen/netfront/netfront.c | 4 +--- sys/dev/xen/privcmd/privcmd.c | 2 +- sys/dev/xen/xenstore/xenstore.c | 3 --- sys/x86/xen/pv.c | 3 --- sys/x86/xen/xen_intr.c | 2 +- 9 files changed, 8 insertions(+), 18 deletions(-) diff --git a/sys/dev/xen/balloon/balloon.c b/sys/dev/xen/balloon/balloon.c index 007fada24259..7e97fa144485 100644 --- a/sys/dev/xen/balloon/balloon.c +++ b/sys/dev/xen/balloon/balloon.c @@ -177,7 +177,7 @@ increase_reservation(unsigned long nr_pages) XENMEM_populate_physmap, &reservation); if (rc < nr_pages) { if (rc > 0) { - int ret; + int ret __diagused; /* We hit the Xen hard limit: reprobe. */ reservation.nr_extents = rc; @@ -215,7 +215,7 @@ decrease_reservation(unsigned long nr_pages) unsigned long i; vm_page_t page; int need_sleep = 0; - int ret; + int ret __diagused; struct xen_memory_reservation reservation = { .address_bits = 0, .extent_order = 0, diff --git a/sys/dev/xen/blkback/blkback.c b/sys/dev/xen/blkback/blkback.c index 6a4e8007f6b9..4470cc59a29a 100644 --- a/sys/dev/xen/blkback/blkback.c +++ b/sys/dev/xen/blkback/blkback.c @@ -1087,7 +1087,7 @@ xbb_unmap_reqlist(struct xbb_xen_reqlist *reqlist) struct gnttab_unmap_grant_ref unmap[XBB_MAX_SEGMENTS_PER_REQLIST]; u_int i; u_int invcount; - int error; + int error __diagused; invcount = 0; for (i = 0; i < reqlist->nr_segments; i++) { @@ -1645,11 +1645,9 @@ xbb_dispatch_io(struct xbb_softc *xbb, struct xbb_xen_reqlist *reqlist) STAILQ_FOREACH(nreq, &reqlist->contig_req_list, links) { blkif_request_t *ring_req; - RING_IDX req_ring_idx; u_int req_seg_idx; ring_req = nreq->ring_req; - req_ring_idx = nreq->req_ring_idx; nr_sects = 0; nseg = ring_req->nr_segments; nreq->nr_pages = nseg; diff --git a/sys/dev/xen/console/xen_console.c b/sys/dev/xen/console/xen_console.c index 8ad755dbf214..c26b741c37fe 100644 --- a/sys/dev/xen/console/xen_console.c +++ b/sys/dev/xen/console/xen_console.c @@ -701,7 +701,7 @@ static struct ttydevsw xencons_ttydevsw = { static void xencons_identify(driver_t *driver, device_t parent) { - device_t child; + device_t child __unused; if (main_cons.ops == NULL) return; diff --git a/sys/dev/xen/netback/netback.c b/sys/dev/xen/netback/netback.c index 06d92093d903..8de4e11c61d9 100644 --- a/sys/dev/xen/netback/netback.c +++ b/sys/dev/xen/netback/netback.c @@ -639,7 +639,7 @@ static int xnb_disconnect(struct xnb_softc *xnb) { struct gnttab_unmap_grant_ref gnts[XNB_NUM_RING_TYPES]; - int error; + int error __diagused; int i; if (xnb->xen_intr_handle != NULL) diff --git a/sys/dev/xen/netfront/netfront.c b/sys/dev/xen/netfront/netfront.c index fd2d97a7c70c..8dba5a8dc6d5 100644 --- a/sys/dev/xen/netfront/netfront.c +++ b/sys/dev/xen/netfront/netfront.c @@ -1409,10 +1409,9 @@ xn_get_responses(struct netfront_rxq *rxq, struct netif_extra_info *extras = rinfo->extras; struct mbuf *m, *m0, *m_prev; grant_ref_t ref = xn_get_rx_ref(rxq, *cons); - RING_IDX ref_cons = *cons; int frags = 1; int err = 0; - u_long ret; + u_long ret __diagused; m0 = m = m_prev = xn_get_rx_mbuf(rxq, *cons); @@ -1500,7 +1499,6 @@ next_skip_queue: m0 = m; m->m_next = NULL; ref = xn_get_rx_ref(rxq, *cons + frags); - ref_cons = *cons + frags; frags++; } *list = m0; diff --git a/sys/dev/xen/privcmd/privcmd.c b/sys/dev/xen/privcmd/privcmd.c index 763c2f471c4f..f8da2e2d9a35 100644 --- a/sys/dev/xen/privcmd/privcmd.c +++ b/sys/dev/xen/privcmd/privcmd.c @@ -121,7 +121,7 @@ privcmd_pg_dtor(void *handle) { struct xen_remove_from_physmap rm = { .domid = DOMID_SELF }; struct privcmd_map *map = handle; - int error; + int error __diagused; vm_size_t i; vm_page_t m; diff --git a/sys/dev/xen/xenstore/xenstore.c b/sys/dev/xen/xenstore/xenstore.c index dc00ed0d50b8..d09fd22f4eb1 100644 --- a/sys/dev/xen/xenstore/xenstore.c +++ b/sys/dev/xen/xenstore/xenstore.c @@ -787,11 +787,8 @@ xs_read_reply(enum xsd_sockmsg_type *type, u_int *len, void **result) int xs_dev_request_and_reply(struct xsd_sockmsg *msg, void **result) { - uint32_t request_type; int error; - request_type = msg->type; - sx_xlock(&xs.request_mutex); if ((error = xs_write_store(msg, sizeof(*msg) + msg->len)) == 0) error = xs_read_reply(&msg->type, &msg->len, result); diff --git a/sys/x86/xen/pv.c b/sys/x86/xen/pv.c index a316d4ee8857..e0c88992390e 100644 --- a/sys/x86/xen/pv.c +++ b/sys/x86/xen/pv.c @@ -255,11 +255,8 @@ xen_pvh_parse_symtab(void) { Elf_Ehdr *ehdr; Elf_Shdr *shdr; - uint32_t size; int i, j; - size = end; - ehdr = (Elf_Ehdr *)(&end + 1); if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) || ehdr->e_ident[EI_CLASS] != ELF_TARG_CLASS || diff --git a/sys/x86/xen/xen_intr.c b/sys/x86/xen/xen_intr.c index a3d84965f0f2..08e3ac6b1f52 100644 --- a/sys/x86/xen/xen_intr.c +++ b/sys/x86/xen/xen_intr.c @@ -491,7 +491,7 @@ xen_intr_active_ports(struct xen_intr_pcpu_data *pcpu, shared_info_t *sh, void xen_intr_handle_upcall(struct trapframe *trap_frame) { - u_int l1i, l2i, port, cpu; + u_int l1i, l2i, port, cpu __diagused; u_long masked_l1, masked_l2; struct xenisrc *isrc; shared_info_t *s;