From e61865951d2c78246bce4bcda3814ca04069da96 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Sat, 29 Jul 2017 10:09:17 +0200 Subject: [PATCH] kernel: Remove some variables that are only set but never used. Reported-by: dcb Dragonfly-bug: --- sys/dev/disk/amd/amd.c | 3 --- sys/dev/disk/ncr/ncr.c | 2 -- sys/dev/raid/vinum/vinumio.c | 4 ---- sys/net/pf/pf_ioctl.c | 2 -- 4 files changed, 11 deletions(-) diff --git a/sys/dev/disk/amd/amd.c b/sys/dev/disk/amd/amd.c index b5acf64f18..2a5ea0641d 100644 --- a/sys/dev/disk/amd/amd.c +++ b/sys/dev/disk/amd/amd.c @@ -912,7 +912,6 @@ amdstart(struct amd_softc *amd, struct amd_srb *pSRB) u_int command; u_int target; u_int lun; - int tagged; pccb = pSRB->pccb; pcsio = &pccb->csio; @@ -937,7 +936,6 @@ amdstart(struct amd_softc *amd, struct amd_srb *pSRB) identify_msg |= MSG_IDENTIFY_DISCFLAG; amd_write8(amd, SCSIFIFOREG, identify_msg); - tagged = 0; if ((targ_info->disc_tag & AMD_CUR_TAGENB) == 0 || (identify_msg & MSG_IDENTIFY_DISCFLAG) == 0) pccb->ccb_h.flags &= ~CAM_TAG_ACTION_VALID; @@ -951,7 +949,6 @@ amdstart(struct amd_softc *amd, struct amd_srb *pSRB) pSRB->SRBState = SRB_START; amd_write8(amd, SCSIFIFOREG, pcsio->tag_action); amd_write8(amd, SCSIFIFOREG, pSRB->TagNumber); - tagged++; } else { command = SEL_W_ATN; pSRB->SRBState = SRB_START; diff --git a/sys/dev/disk/ncr/ncr.c b/sys/dev/disk/ncr/ncr.c index 7b09a20641..060d40a729 100644 --- a/sys/dev/disk/ncr/ncr.c +++ b/sys/dev/disk/ncr/ncr.c @@ -5107,7 +5107,6 @@ ncr_timeout (void *arg) ncb_p np = arg; time_t thistime = time_uptime; ticks_t step = np->ticks; - u_long count = 0; long t; nccb_p cp; @@ -5155,7 +5154,6 @@ ncr_timeout (void *arg) ** look for timed out nccbs. */ if (!cp->host_status) continue; - count++; if (cp->tlimit > thistime) continue; /* diff --git a/sys/dev/raid/vinum/vinumio.c b/sys/dev/raid/vinum/vinumio.c index 02feeee9a9..6f91244c2d 100644 --- a/sys/dev/raid/vinum/vinumio.c +++ b/sys/dev/raid/vinum/vinumio.c @@ -695,12 +695,9 @@ vinum_scandisk(char *devicename[], int drives) for (driveno = 0; driveno < drives; driveno++) { char part, has_part = 0; /* UNIX partition */ int slice; - int founddrive; /* flag when we find a vinum drive */ int has_slice = -1; char *tmp; - founddrive = 0; /* no vinum drive found yet on this spindle */ - /* * If the device path contains a slice we do not try to tack on * another slice. If the device path has a partition we only check @@ -741,7 +738,6 @@ vinum_scandisk(char *devicename[], int drives) drivelist[gooddrives] = drive->driveno; /* keep the drive index */ drive->flags &= ~VF_NEWBORN; /* which is no longer newly born */ gooddrives++; - founddrive++; } } } diff --git a/sys/net/pf/pf_ioctl.c b/sys/net/pf/pf_ioctl.c index ae0347d2ca..a07eabc849 100644 --- a/sys/net/pf/pf_ioctl.c +++ b/sys/net/pf/pf_ioctl.c @@ -3011,7 +3011,6 @@ static void pf_clear_states(void) { struct pf_state *s, *nexts; - u_int killed = 0; globaldata_t save_gd = mycpu; int nn; @@ -3023,7 +3022,6 @@ pf_clear_states(void) /* don't send out individual delete messages */ s->sync_flags = PFSTATE_NOSYNC; pf_unlink_state(s); - killed++; } } -- 2.41.0