xen: plug some of set-but-not-used vars

Sponsored by:	Rubicon Communications, LLC ("Netgate")
This commit is contained in:
Mateusz Guzik 2021-12-15 13:45:04 +00:00
parent 517a7adb11
commit e7236a7ddf
9 changed files with 8 additions and 18 deletions

View File

@ -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,

View File

@ -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;

View File

@ -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;

View File

@ -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)

View File

@ -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 @@ xn_get_responses(struct netfront_rxq *rxq,
m0 = m;
m->m_next = NULL;
ref = xn_get_rx_ref(rxq, *cons + frags);
ref_cons = *cons + frags;
frags++;
}
*list = m0;

View File

@ -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;

View File

@ -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);

View File

@ -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 ||

View File

@ -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;