Fix various places where assignment happen to casted lvalues.
(t)v = foo; is not legal C.
This commit is contained in:
parent
8b9db7a800
commit
5c53cf65da
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: db_machdep.h,v 1.12 2003/04/29 17:06:07 scw Exp $ */
|
||||
/* $NetBSD: db_machdep.h,v 1.13 2006/03/12 17:14:41 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Mach Operating System
|
||||
|
@ -46,7 +46,7 @@ typedef struct trapframe db_regs_t;
|
|||
extern db_regs_t ddb_regs; /* register state */
|
||||
#define DDB_REGS (&ddb_regs)
|
||||
|
||||
#define PC_REGS(regs) ((db_addr_t)(regs)->pc)
|
||||
#define PC_REGS(regs) (*(db_addr_t *)&(regs)->pc)
|
||||
|
||||
#define BKPT_ADDR(addr) (addr) /* breakpoint address */
|
||||
#define BKPT_INST 0x03 /* breakpoint instruction */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pmap.h,v 1.65 2006/02/16 20:17:15 perry Exp $ */
|
||||
/* $NetBSD: pmap.h,v 1.66 2006/03/12 17:14:41 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991 Regents of the University of California.
|
||||
|
@ -133,11 +133,11 @@ extern struct pv_entry *pv_table;
|
|||
|
||||
/* Mapping macros used when allocating SPT */
|
||||
#define MAPVIRT(ptr, count) \
|
||||
(vaddr_t)ptr = virtual_avail; \
|
||||
*(vaddr_t *)&ptr = virtual_avail; \
|
||||
virtual_avail += (count) * VAX_NBPG;
|
||||
|
||||
#define MAPPHYS(ptr, count, perm) \
|
||||
(vaddr_t)ptr = avail_start + KERNBASE; \
|
||||
*(vaddr_t *)&ptr = avail_start + KERNBASE; \
|
||||
avail_start += (count) * VAX_NBPG;
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pmap.c,v 1.135 2005/12/11 12:19:36 christos Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.136 2006/03/12 17:14:41 matt Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1994, 1998, 1999, 2003 Ludd, University of Lule}, Sweden.
|
||||
* All rights reserved.
|
||||
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.135 2005/12/11 12:19:36 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.136 2006/03/12 17:14:41 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_cputype.h"
|
||||
|
@ -1201,7 +1201,7 @@ pmap_map(virtuell, pstart, pend, prot)
|
|||
pstart=(uint)pstart &0x7fffffff;
|
||||
pend=(uint)pend &0x7fffffff;
|
||||
virtuell=(uint)virtuell &0x7fffffff;
|
||||
(uint)pentry= (((uint)(virtuell)>>VAX_PGSHIFT)*4)+(uint)Sysmap;
|
||||
pentry = (int *)(((uint)(virtuell)>>VAX_PGSHIFT)*4)+(uint)Sysmap;
|
||||
for(count=pstart;count<pend;count+=VAX_NBPG){
|
||||
*pentry++ = (count>>VAX_PGSHIFT)|PG_V|
|
||||
(prot & VM_PROT_WRITE ? PG_KW : PG_KR);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: scb.c,v 1.16 2005/12/11 12:19:36 christos Exp $ */
|
||||
/* $NetBSD: scb.c,v 1.17 2006/03/12 17:14:41 matt Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1999 Ludd, University of Lule}, Sweden.
|
||||
* All rights reserved.
|
||||
|
@ -34,7 +34,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: scb.c,v 1.16 2005/12/11 12:19:36 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: scb.c,v 1.17 2006/03/12 17:14:41 matt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -72,7 +72,7 @@ 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] |= 1; /* On istack, please */
|
||||
*(uintptr_t *)&ivec[i] |= 1; /* On istack, please */
|
||||
scb_vec[i] = idsptch;
|
||||
scb_vec[i].hoppaddr = scb_stray;
|
||||
scb_vec[i].pushlarg = (void *) (i * 4);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dz_vsbus.c,v 1.36 2005/12/11 12:19:37 christos Exp $ */
|
||||
/* $NetBSD: dz_vsbus.c,v 1.37 2006/03/12 17:14:42 matt Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1998 Ludd, University of Lule}, Sweden.
|
||||
* All rights reserved.
|
||||
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: dz_vsbus.c,v 1.36 2005/12/11 12:19:37 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dz_vsbus.c,v 1.37 2006/03/12 17:14:42 matt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/proc.h>
|
||||
|
@ -277,7 +277,8 @@ dzcnprobe(struct consdev *cndev)
|
|||
else
|
||||
cndev->cn_pri = CN_NORMAL;
|
||||
cndev->cn_dev = makedev(cdevsw_lookup_major(&dz_cdevsw), diagcons);
|
||||
(vaddr_t)dz = dz_regs = iospace;
|
||||
dz_regs = iospace;
|
||||
dz = (void *)dz_regs;
|
||||
ioaccess(iospace, ioaddr, 1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue