Remove unused variable.

Found by:       FlexeLint
This commit is contained in:
phk 2003-05-31 19:28:53 +00:00
parent 926fff03bf
commit ef00c86fce
4 changed files with 2 additions and 24 deletions

View File

@ -51,13 +51,7 @@
static void
g_bde_start(struct bio *bp)
{
struct g_geom *gp;
struct g_consumer *cp;
struct g_bde_softc *sc;
gp = bp->bio_to->geom;
cp = LIST_FIRST(&gp->consumer);
sc = gp->softc;
switch (bp->bio_cmd) {
case BIO_DELETE:
case BIO_READ:

View File

@ -160,11 +160,7 @@ g_aes_read_done(struct bio *bp)
static void
g_aes_write_done(struct bio *bp)
{
struct g_aes_softc *sc;
struct g_geom *gp;
gp = bp->bio_to->geom;
sc = gp->softc;
bzero(bp->bio_data, bp->bio_length); /* destroy evidence */
g_free(bp->bio_data);
g_std_done(bp);

View File

@ -92,13 +92,11 @@ g_apple_start(struct bio *bp)
{
struct g_provider *pp;
struct g_geom *gp;
struct g_apm_softc *mp;
struct g_slicer *gsp;
pp = bp->bio_to;
gp = pp->geom;
gsp = gp->softc;
mp = gsp->softc;
if (bp->bio_cmd == BIO_GETATTR) {
if (g_handleattr_off_t(bp, "APM::offset",
gsp->slices[pp->index].offset))
@ -145,9 +143,8 @@ g_apple_taste(struct g_class *mp, struct g_provider *pp, int insist)
{
struct g_geom *gp;
struct g_consumer *cp;
int error, i, npart;
int error, i;
struct g_apple_softc *ms;
struct g_slicer *gsp;
struct apm_partition *apm;
u_int sectorsize;
u_char *buf;
@ -157,10 +154,8 @@ g_apple_taste(struct g_class *mp, struct g_provider *pp, int insist)
gp = g_slice_new(mp, NAPMPART, pp, &cp, &ms, sizeof *ms, g_apple_start);
if (gp == NULL)
return (NULL);
gsp = gp->softc;
g_topology_unlock();
gp->dumpconf = g_apple_dumpconf;
npart = 0;
do {
if (gp->rank != 2 && insist == 0)
break;
@ -218,7 +213,6 @@ g_apple_taste(struct g_class *mp, struct g_provider *pp, int insist)
&ms->apmpart[i]);
}
npart = 0;
for (i = 0; i < NAPMPART; i++) {
apm = &ms->apmpart[i];
@ -237,7 +231,6 @@ g_apple_taste(struct g_class *mp, struct g_provider *pp, int insist)
gp->name);
/* g_apple_print(i, dp + i); */
}
npart++;
g_topology_lock();
g_slice_config(gp, i, G_SLICE_CONFIG_SET,
(off_t)apm->am_start << 9ULL,

View File

@ -111,11 +111,10 @@ g_gpt_taste(struct g_class *mp, struct g_provider *pp, int insist)
struct g_consumer *cp;
struct g_geom *gp;
struct g_gpt_softc *gs;
struct g_slicer *gsp;
u_char *buf, *mbr;
struct gpt_ent *ent;
struct gpt_hdr *hdr;
u_int i, npart, secsz, tblsz;
u_int i, secsz, tblsz;
int error, ps;
g_trace(G_T_TOPOLOGY, "g_gpt_taste(%s,%s)", mp->name, pp->name);
@ -131,13 +130,11 @@ g_gpt_taste(struct g_class *mp, struct g_provider *pp, int insist)
if (gp == NULL)
return (NULL);
gsp = gp->softc;
g_topology_unlock();
gp->dumpconf = g_gpt_dumpconf;
do {
npart = 0;
mbr = NULL;
if (gp->rank != 2 && insist == 0)
@ -204,13 +201,11 @@ g_gpt_taste(struct g_class *mp, struct g_provider *pp, int insist)
secsz,
"%s%c%d", gp->name, ps, i + 1);
g_topology_unlock();
npart++;
}
g_free(buf);
} while (0);
if (mbr != NULL)
g_free(mbr);