diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2012-11-25 22:13:47 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2012-11-25 22:13:47 +0000 |
commit | 7973dcaff7b9f8f3a27d8f941897b6d3ef2bfd78 (patch) | |
tree | ca18f897048b84527f1c3915e112a76d704a6edb /sys | |
parent | 50857113e21f44779304572a1561953a130bf7f3 (diff) |
remove the use of cast as lvalue which is verboten with newer gcc
tweaks from/tested by/ok miod@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/vax/include/pmap.h | 6 | ||||
-rw-r--r-- | sys/arch/vax/mscp/mscp_tape.c | 4 | ||||
-rw-r--r-- | sys/arch/vax/vax/pmap.c | 5 | ||||
-rw-r--r-- | sys/arch/vax/vax/scb.c | 6 |
4 files changed, 11 insertions, 10 deletions
diff --git a/sys/arch/vax/include/pmap.h b/sys/arch/vax/include/pmap.h index 4ae2a3c290b..3c77b217aa0 100644 --- a/sys/arch/vax/include/pmap.h +++ b/sys/arch/vax/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.32 2011/03/23 16:54:37 pirofti Exp $ */ +/* $OpenBSD: pmap.h,v 1.33 2012/11/25 22:13:46 jsg Exp $ */ /* $NetBSD: pmap.h,v 1.37 1999/08/01 13:48:07 ragge Exp $ */ /* @@ -87,11 +87,11 @@ struct pv_entry { /* Mapping macros used when allocating SPT */ #define MAPVIRT(ptr, count) \ - (vaddr_t)ptr = virtual_avail; \ + ptr = virtual_avail; \ virtual_avail += (count) * VAX_NBPG; #define MAPPHYS(ptr, count, perm) \ - (paddr_t)ptr = avail_start + KERNBASE; \ + ptr = avail_start + KERNBASE; \ avail_start += (count) * VAX_NBPG; extern struct pmap kernel_pmap_store; diff --git a/sys/arch/vax/mscp/mscp_tape.c b/sys/arch/vax/mscp/mscp_tape.c index 1975a8447c1..d2f2f093bc8 100644 --- a/sys/arch/vax/mscp/mscp_tape.c +++ b/sys/arch/vax/mscp/mscp_tape.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mscp_tape.c,v 1.12 2011/04/06 18:12:47 miod Exp $ */ +/* $OpenBSD: mscp_tape.c,v 1.13 2012/11/25 22:13:46 jsg Exp $ */ /* $NetBSD: mscp_tape.c,v 1.16 2001/11/13 07:38:28 lukem Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. @@ -169,7 +169,7 @@ mt_putonline(mt) struct mscp_softc *mi = (struct mscp_softc *)mt->mt_dev.dv_parent; volatile int i; - (volatile int)mt->mt_state = MT_OFFLINE; + mt->mt_state = MT_OFFLINE; mp = mscp_getcp(mi, MSCP_WAIT); mp->mscp_opcode = M_OP_ONLINE; mp->mscp_unit = mt->mt_hwunit; diff --git a/sys/arch/vax/vax/pmap.c b/sys/arch/vax/vax/pmap.c index eebcc0ad66f..66adc3f88ba 100644 --- a/sys/arch/vax/vax/pmap.c +++ b/sys/arch/vax/vax/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.54 2012/04/10 15:50:52 guenther Exp $ */ +/* $OpenBSD: pmap.c,v 1.55 2012/11/25 22:13:46 jsg Exp $ */ /* $NetBSD: pmap.c,v 1.74 1999/11/13 21:32:25 matt Exp $ */ /* * Copyright (c) 1994, 1998, 1999 Ludd, University of Lule}, Sweden. @@ -380,7 +380,8 @@ pmap_create() if (res) panic("pmap_create"); pmap->pm_p0lr = vax_atop(MAXTSIZ + MAXDSIZ + BRKSIZ) | AST_PCB; - (vaddr_t)pmap->pm_p1br = (vaddr_t)pmap->pm_p0br + bytesiz - 0x800000; + pmap->pm_p1br = pmap->pm_p0br + + (bytesiz - 0x800000) / sizeof(pt_entry_t); pmap->pm_p1lr = vax_atop(0x40000000 - MAXSSIZ); pmap->pm_stack = USRSTACK; diff --git a/sys/arch/vax/vax/scb.c b/sys/arch/vax/vax/scb.c index 1150b9f3a57..52488a9ff87 100644 --- a/sys/arch/vax/vax/scb.c +++ b/sys/arch/vax/vax/scb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scb.c,v 1.6 2008/08/18 23:19:29 miod Exp $ */ +/* $OpenBSD: scb.c,v 1.7 2012/11/25 22:13:46 jsg Exp $ */ /* $NetBSD: scb.c,v 1.12 2000/06/04 06:16:59 matt Exp $ */ /* * Copyright (c) 1999 Ludd, University of Lule}, Sweden. @@ -68,8 +68,8 @@ scb_init(paddr_t avail_start) /* Init the whole SCB with interrupt catchers */ for (i = 0; i < (scb_size * VAX_NBPG)/4; i++) { - ivec[i] = &scb_vec[i]; - (int)ivec[i] |= SCB_ISTACK; /* On istack, please */ + ivec[i] = (struct ivec_dsp *) + ((vaddr_t)&scb_vec[i] | SCB_ISTACK); /* On istack, please */ scb_vec[i] = idsptch; scb_vec[i].hoppaddr = scb_stray; scb_vec[i].pushlarg = (void *) (i * 4); |