Get rid of lvalue casts by either using an extra temporary variable
or by using the appropriate casts in the first place.
This commit is contained in:
parent
391d67720b
commit
6f8829a0d2
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: autoconf.c,v 1.23 2005/12/24 22:45:40 perry Exp $ */
|
||||
/* $NetBSD: autoconf.c,v 1.24 2006/06/08 07:03:11 he Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden.
|
||||
* All rights reserved.
|
||||
|
@ -154,7 +154,7 @@ mcheck(void *arg)
|
|||
void
|
||||
scbinit()
|
||||
{
|
||||
int i;
|
||||
int i, addr;
|
||||
|
||||
/*
|
||||
* Allocate space. We need one page for the SCB, and 128*20 == 2.5k
|
||||
|
@ -169,7 +169,9 @@ scbinit()
|
|||
|
||||
for (i = 0; i < 128; i++) {
|
||||
scb[i] = &scb_vec[i];
|
||||
(int)scb[i] |= SCB_ISTACK; /* Only interrupt stack */
|
||||
addr = (int)scb[i];
|
||||
addr |= SCB_ISTACK; /* Only interrupt stack */
|
||||
scb[i] = (struct ivec_dsp*)addr;
|
||||
scb_vec[i] = idsptch;
|
||||
scb_vec[i].hoppaddr = scb_stray;
|
||||
scb_vec[i].pushlarg = (void *) (i * 4);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_de.c,v 1.2 2002/05/24 21:41:40 ragge Exp $ */
|
||||
/* $NetBSD: if_de.c,v 1.3 2006/06/08 07:03:11 he Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved.
|
||||
|
@ -114,7 +114,7 @@ deopen(struct open_file *f, int adapt, int ctlr, int unit, int part)
|
|||
|
||||
/* Map in the control structures and buffers */
|
||||
dc = alloc(sizeof(struct de_cdata));
|
||||
(int)pdc = (int)dc & VAX_PGOFSET;
|
||||
pdc = (struct de_cdata *)((int)dc & VAX_PGOFSET);
|
||||
map = (int *)nexaddr + 512;
|
||||
npgs = (sizeof(struct de_cdata) >> VAX_PGSHIFT) + 1;
|
||||
cdata = (int)dc >> VAX_PGSHIFT;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_le.c,v 1.8 2005/12/11 12:19:30 christos Exp $ */
|
||||
/* $NetBSD: if_le.c,v 1.9 2006/06/08 07:03:11 he Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1997, 1999 Ludd, University of Lule}, Sweden.
|
||||
* All rights reserved.
|
||||
|
@ -169,18 +169,21 @@ igen:
|
|||
eaddr[i] = ea[i] & 0377;
|
||||
|
||||
if (initblock == NULL) {
|
||||
(void *)initblock =
|
||||
(char *)QW_ALLOC(sizeof(struct initblock)) + addoff;
|
||||
initblock =
|
||||
(struct initblock *)QW_ALLOC(sizeof(struct initblock)) +
|
||||
addoff;
|
||||
initblock->ib_mode = LE_MODE_NORMAL;
|
||||
bcopy(eaddr, initblock->ib_padr, 6);
|
||||
initblock->ib_ladrf1 = 0;
|
||||
initblock->ib_ladrf2 = 0;
|
||||
|
||||
(int)rdesc = QW_ALLOC(sizeof(struct buffdesc) * NRBUF) + addoff;
|
||||
rdesc = (struct buffdesc *)QW_ALLOC(sizeof(struct buffdesc) *
|
||||
NRBUF) + addoff;
|
||||
initblock->ib_rdr = (RLEN << 29) | (int)rdesc;
|
||||
if (kopiera)
|
||||
initblock->ib_rdr -= (int)initblock;
|
||||
(int)tdesc = QW_ALLOC(sizeof(struct buffdesc) * NTBUF) + addoff;
|
||||
tdesc = (struct buffdesc *)QW_ALLOC(sizeof(struct buffdesc) *
|
||||
NTBUF) + addoff;
|
||||
initblock->ib_tdr = (TLEN << 29) | (int)tdesc;
|
||||
if (kopiera)
|
||||
initblock->ib_tdr -= (int)initblock;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mfm.c,v 1.6 2005/12/11 12:19:30 christos Exp $ */
|
||||
/* $NetBSD: mfm.c,v 1.7 2006/06/08 07:03:11 he Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
|
||||
* All rights reserved.
|
||||
|
@ -460,6 +460,9 @@ mfm_rxstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *
|
|||
struct mfm_softc *msc = f;
|
||||
struct disklabel *lp;
|
||||
int block, sect, head, cyl, scount, res;
|
||||
char *cbuf;
|
||||
|
||||
cbuf = (char*)buf;
|
||||
|
||||
lp = &mfmlabel;
|
||||
block = (dblk < 0 ? 0 : dblk + lp->d_partitions[msc->part].p_offset);
|
||||
|
@ -516,7 +519,7 @@ mfm_rxstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *
|
|||
|
||||
mfm_rxprepare();
|
||||
/* copy from buf */
|
||||
bcopy(buf, (void *) 0x200D0000, *rsize);
|
||||
bcopy(cbuf, (void *) 0x200D0000, *rsize);
|
||||
res = mfm_command(DKC_CMD_WRITE_RX33);
|
||||
} else {
|
||||
creg.udc_rtcnt = UDC_RC_RX33READ;
|
||||
|
@ -528,12 +531,12 @@ mfm_rxstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *
|
|||
bzero((void *) 0x200D0000, *rsize);
|
||||
res = mfm_command(DKC_CMD_READ_RX33);
|
||||
/* copy to buf */
|
||||
bcopy((void *) 0x200D0000, buf, *rsize);
|
||||
bcopy((void *) 0x200D0000, cbuf, *rsize);
|
||||
}
|
||||
|
||||
scount -= *rsize / 512;
|
||||
block += *rsize / 512;
|
||||
(char *)buf += *rsize;
|
||||
cbuf += *rsize;
|
||||
}
|
||||
|
||||
*rsize = size;
|
||||
|
@ -545,6 +548,9 @@ mfm_rdstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *
|
|||
struct mfm_softc *msc = f;
|
||||
struct disklabel *lp;
|
||||
int block, sect, head, cyl, scount, cmd, res;
|
||||
char *cbuf;
|
||||
|
||||
cbuf = (char *)buf;
|
||||
|
||||
lp = &mfmlabel;
|
||||
block = (dblk < 0 ? 0 : dblk + lp->d_partitions[msc->part].p_offset);
|
||||
|
@ -604,7 +610,7 @@ mfm_rdstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *
|
|||
creg.udc_term = UDC_TC_HDD;
|
||||
cmd = DKC_CMD_WRITE_HDD;
|
||||
|
||||
bcopy(buf, (void *) 0x200D0000, *rsize);
|
||||
bcopy(cbuf, (void *) 0x200D0000, *rsize);
|
||||
res = mfm_command(cmd);
|
||||
} else {
|
||||
creg.udc_rtcnt = UDC_RC_HDD_READ;
|
||||
|
@ -614,12 +620,12 @@ mfm_rdstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *
|
|||
|
||||
bzero((void *) 0x200D0000, *rsize);
|
||||
res = mfm_command(cmd);
|
||||
bcopy((void *) 0x200D0000, buf, *rsize);
|
||||
bcopy((void *) 0x200D0000, cbuf, *rsize);
|
||||
}
|
||||
|
||||
scount -= *rsize / 512;
|
||||
block += *rsize / 512;
|
||||
(char *)buf += *rsize;
|
||||
cbuf += *rsize;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ra.c,v 1.14 2005/12/11 12:19:30 christos Exp $ */
|
||||
/* $NetBSD: ra.c,v 1.15 2006/06/08 07:03:11 he Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1995 Ludd, University of Lule}, Sweden.
|
||||
* All rights reserved.
|
||||
|
@ -111,7 +111,7 @@ raopen(struct open_file *f, int adapt, int ctlr, int unit, int part)
|
|||
mapregs = (int *)nexaddr + 512;
|
||||
mapregs[494] = PG_V | (((u_int)&uda) >> 9);
|
||||
mapregs[495] = mapregs[494] + 1;
|
||||
(char *)ubauda = (char *)0x3dc00 +
|
||||
ubauda = (struct uda *)0x3dc00 +
|
||||
(((u_int)(&uda))&0x1ff);
|
||||
} else
|
||||
ubauda = &uda;
|
||||
|
|
Loading…
Reference in New Issue