summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>1999-01-28 01:59:53 +0000
committerdillon <dillon@FreeBSD.org>1999-01-28 01:59:53 +0000
commit9328688fc8b9743439e9dbe6f6364cb0317e387f (patch)
tree4f99904371de94ee7846eb8f747ab1e5a1fa463b
parentc970e06ccf646c8d420b2216f605eefeef3cdc0d (diff)
downloadFreeBSD-src-9328688fc8b9743439e9dbe6f6364cb0317e387f.zip
FreeBSD-src-9328688fc8b9743439e9dbe6f6364cb0317e387f.tar.gz
Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile
-rw-r--r--sys/amd64/amd64/amd64-gdbstub.c2
-rw-r--r--sys/amd64/amd64/db_disasm.c8
-rw-r--r--sys/amd64/amd64/db_trace.c34
-rw-r--r--sys/amd64/amd64/elf_machdep.c6
-rw-r--r--sys/amd64/amd64/mp_machdep.c4
-rw-r--r--sys/amd64/amd64/mptable.c4
-rw-r--r--sys/amd64/amd64/pmap.c6
-rw-r--r--sys/amd64/amd64/sys_machdep.c10
-rw-r--r--sys/amd64/include/mptable.h4
-rw-r--r--sys/dev/cs/if_cs.c6
-rw-r--r--sys/dev/cy/cy.c54
-rw-r--r--sys/dev/cy/cy_isa.c54
-rw-r--r--sys/dev/ed/if_ed.c6
-rw-r--r--sys/dev/ex/if_ex.c4
-rw-r--r--sys/dev/ie/if_ie.c102
-rw-r--r--sys/dev/kbd/kbdtables.h6
-rw-r--r--sys/dev/syscons/syscons.c4
-rw-r--r--sys/dev/usb/ucom.c8
-rw-r--r--sys/dev/usb/uhid.c4
-rw-r--r--sys/dev/usb/ukbd.c4
-rw-r--r--sys/dev/usb/ulpt.c4
-rw-r--r--sys/dev/usb/umodem.c4
-rw-r--r--sys/dev/usb/ums.c4
-rw-r--r--sys/i386/i386/db_disasm.c8
-rw-r--r--sys/i386/i386/db_trace.c34
-rw-r--r--sys/i386/i386/elf_machdep.c6
-rw-r--r--sys/i386/i386/i386-gdbstub.c2
-rw-r--r--sys/i386/i386/in_cksum.c10
-rw-r--r--sys/i386/i386/math_emulate.c8
-rw-r--r--sys/i386/i386/mp_machdep.c4
-rw-r--r--sys/i386/i386/mptable.c4
-rw-r--r--sys/i386/i386/pmap.c6
-rw-r--r--sys/i386/i386/sys_machdep.c10
-rw-r--r--sys/i386/i386/userconfig.c32
-rw-r--r--sys/i386/i386/vm86.c8
-rw-r--r--sys/i386/ibcs2/ibcs2_ioctl.c2
-rw-r--r--sys/i386/ibcs2/ibcs2_misc.c36
-rw-r--r--sys/i386/ibcs2/ibcs2_msg.c12
-rw-r--r--sys/i386/ibcs2/ibcs2_socksys.c2
-rw-r--r--sys/i386/ibcs2/ibcs2_stat.c20
-rw-r--r--sys/i386/ibcs2/ibcs2_sysi86.c2
-rw-r--r--sys/i386/ibcs2/ibcs2_xenix.c6
-rw-r--r--sys/i386/ibcs2/imgact_coff.c42
-rw-r--r--sys/i386/include/mptable.h4
-rw-r--r--sys/i386/isa/asc.c4
-rw-r--r--sys/i386/isa/cy.c54
-rw-r--r--sys/i386/isa/diskslice_machdep.c10
-rw-r--r--sys/i386/isa/if_cs.c6
-rw-r--r--sys/i386/isa/if_ed.c6
-rw-r--r--sys/i386/isa/if_ex.c4
-rw-r--r--sys/i386/isa/if_ie.c102
-rw-r--r--sys/kern/subr_diskmbr.c10
-rw-r--r--sys/kern/subr_smp.c4
53 files changed, 402 insertions, 398 deletions
diff --git a/sys/amd64/amd64/amd64-gdbstub.c b/sys/amd64/amd64/amd64-gdbstub.c
index 25e2838..d91ae61 100644
--- a/sys/amd64/amd64/amd64-gdbstub.c
+++ b/sys/amd64/amd64/amd64-gdbstub.c
@@ -271,7 +271,7 @@ putpacket (char *buffer)
checksum = 0;
count = 0;
- while (ch=buffer[count])
+ while ((ch=buffer[count]) != 0)
{
putDebugChar (ch);
checksum += ch;
diff --git a/sys/amd64/amd64/db_disasm.c b/sys/amd64/amd64/db_disasm.c
index 0917ba0..b3b30b1 100644
--- a/sys/amd64/amd64/db_disasm.c
+++ b/sys/amd64/amd64/db_disasm.c
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: db_disasm.c,v 1.20 1997/04/01 16:22:31 bde Exp $
+ * $Id: db_disasm.c,v 1.21 1998/07/08 10:53:56 bde Exp $
*/
/*
@@ -834,9 +834,9 @@ static const char * const db_index_reg_16[8] = {
};
static const char * const db_reg[3][8] = {
- "%al", "%cl", "%dl", "%bl", "%ah", "%ch", "%dh", "%bh",
- "%ax", "%cx", "%dx", "%bx", "%sp", "%bp", "%si", "%di",
- "%eax", "%ecx", "%edx", "%ebx", "%esp", "%ebp", "%esi", "%edi"
+ { "%al", "%cl", "%dl", "%bl", "%ah", "%ch", "%dh", "%bh" },
+ { "%ax", "%cx", "%dx", "%bx", "%sp", "%bp", "%si", "%di" },
+ { "%eax", "%ecx", "%edx", "%ebx", "%esp", "%ebp", "%esi", "%edi" }
};
static const char * const db_seg_reg[8] = {
diff --git a/sys/amd64/amd64/db_trace.c b/sys/amd64/amd64/db_trace.c
index 608dd5d..2ad054f 100644
--- a/sys/amd64/amd64/db_trace.c
+++ b/sys/amd64/amd64/db_trace.c
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: db_trace.c,v 1.31 1998/07/15 11:27:11 bde Exp $
+ * $Id: db_trace.c,v 1.32 1999/01/27 23:45:38 dillon Exp $
*/
#include <sys/param.h>
@@ -44,24 +44,24 @@
* Machine register set.
*/
struct db_variable db_regs[] = {
- "cs", &ddb_regs.tf_cs, FCN_NULL,
- "ds", &ddb_regs.tf_ds, FCN_NULL,
- "es", &ddb_regs.tf_es, FCN_NULL,
+ { "cs", &ddb_regs.tf_cs, FCN_NULL },
+ { "ds", &ddb_regs.tf_ds, FCN_NULL },
+ { "es", &ddb_regs.tf_es, FCN_NULL },
#if 0
- "fs", &ddb_regs.tf_fs, FCN_NULL,
- "gs", &ddb_regs.tf_gs, FCN_NULL,
+ { "fs", &ddb_regs.tf_fs, FCN_NULL },
+ { "gs", &ddb_regs.tf_gs, FCN_NULL },
#endif
- "ss", &ddb_regs.tf_ss, FCN_NULL,
- "eax", &ddb_regs.tf_eax, FCN_NULL,
- "ecx", &ddb_regs.tf_ecx, FCN_NULL,
- "edx", &ddb_regs.tf_edx, FCN_NULL,
- "ebx", &ddb_regs.tf_ebx, FCN_NULL,
- "esp", &ddb_regs.tf_esp, FCN_NULL,
- "ebp", &ddb_regs.tf_ebp, FCN_NULL,
- "esi", &ddb_regs.tf_esi, FCN_NULL,
- "edi", &ddb_regs.tf_edi, FCN_NULL,
- "eip", &ddb_regs.tf_eip, FCN_NULL,
- "efl", &ddb_regs.tf_eflags, FCN_NULL,
+ { "ss", &ddb_regs.tf_ss, FCN_NULL },
+ { "eax", &ddb_regs.tf_eax, FCN_NULL },
+ { "ecx", &ddb_regs.tf_ecx, FCN_NULL },
+ { "edx", &ddb_regs.tf_edx, FCN_NULL },
+ { "ebx", &ddb_regs.tf_ebx, FCN_NULL },
+ { "esp", &ddb_regs.tf_esp, FCN_NULL },
+ { "ebp", &ddb_regs.tf_ebp, FCN_NULL },
+ { "esi", &ddb_regs.tf_esi, FCN_NULL },
+ { "edi", &ddb_regs.tf_edi, FCN_NULL },
+ { "eip", &ddb_regs.tf_eip, FCN_NULL },
+ { "efl", &ddb_regs.tf_eflags, FCN_NULL },
};
struct db_variable *db_eregs = db_regs + sizeof(db_regs)/sizeof(db_regs[0]);
diff --git a/sys/amd64/amd64/elf_machdep.c b/sys/amd64/amd64/elf_machdep.c
index aad9d89..2814f06 100644
--- a/sys/amd64/amd64/elf_machdep.c
+++ b/sys/amd64/amd64/elf_machdep.c
@@ -22,7 +22,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: elf_machdep.c,v 1.3 1998/10/16 03:54:59 peter Exp $
+ * $Id: elf_machdep.c,v 1.4 1998/12/07 21:58:18 archie Exp $
*/
#include <sys/param.h>
@@ -50,13 +50,13 @@ elf_reloc(linker_file_t lf, const void *data, int type, const char *sym)
switch (type) {
case ELF_RELOC_REL:
- rel = (Elf_Rel *)data;
+ rel = (const Elf_Rel *)data;
where = (Elf_Addr *) (relocbase + rel->r_offset);
addend = *where;
rtype = ELF_R_TYPE(rel->r_info);
break;
case ELF_RELOC_RELA:
- rela = (Elf_Rela *)data;
+ rela = (const Elf_Rela *)data;
where = (Elf_Addr *) (relocbase + rela->r_offset);
addend = rela->r_addend;
rtype = ELF_R_TYPE(rela->r_info);
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c
index 569f04b..bd188d3 100644
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.87 1999/01/12 00:19:31 eivind Exp $
+ * $Id: mp_machdep.c,v 1.88 1999/01/20 04:24:22 jkh Exp $
*/
#include "opt_smp.h"
@@ -378,7 +378,7 @@ mp_probe(void)
POSTCODE(MP_PROBE_POST);
/* see if EBDA exists */
- if (segment = (u_long) * (u_short *) (KERNBASE + 0x40e)) {
+ if ((segment = (u_long) * (u_short *) (KERNBASE + 0x40e)) != 0) {
/* search first 1K of EBDA */
target = (u_int32_t) (segment << 4);
if ((x = search_for_sig(target, 1024 / 4)) >= 0)
diff --git a/sys/amd64/amd64/mptable.c b/sys/amd64/amd64/mptable.c
index 569f04b..bd188d3 100644
--- a/sys/amd64/amd64/mptable.c
+++ b/sys/amd64/amd64/mptable.c
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.87 1999/01/12 00:19:31 eivind Exp $
+ * $Id: mp_machdep.c,v 1.88 1999/01/20 04:24:22 jkh Exp $
*/
#include "opt_smp.h"
@@ -378,7 +378,7 @@ mp_probe(void)
POSTCODE(MP_PROBE_POST);
/* see if EBDA exists */
- if (segment = (u_long) * (u_short *) (KERNBASE + 0x40e)) {
+ if ((segment = (u_long) * (u_short *) (KERNBASE + 0x40e)) != 0) {
/* search first 1K of EBDA */
target = (u_int32_t) (segment << 4);
if ((x = search_for_sig(target, 1024 / 4)) >= 0)
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index 12c60da..519326a 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
- * $Id: pmap.c,v 1.220 1999/01/21 08:29:03 dillon Exp $
+ * $Id: pmap.c,v 1.221 1999/01/24 06:04:51 dillon Exp $
*/
/*
@@ -771,7 +771,7 @@ pmap_pte_quick(pmap, va)
vm_offset_t va;
{
unsigned pde, newpf;
- if (pde = (unsigned) pmap->pm_pdir[va >> PDRSHIFT]) {
+ if ((pde = (unsigned) pmap->pm_pdir[va >> PDRSHIFT]) != 0) {
unsigned frame = (unsigned) pmap->pm_pdir[PTDPTDI] & PG_FRAME;
unsigned index = i386_btop(va);
/* are we current address space or kernel? */
@@ -3371,7 +3371,7 @@ pmap_mincore(pmap, addr)
return 0;
}
- if (pte = *ptep) {
+ if ((pte = *ptep) != 0) {
pv_table_t *ppv;
vm_offset_t pa;
diff --git a/sys/amd64/amd64/sys_machdep.c b/sys/amd64/amd64/sys_machdep.c
index 63804ab..17aa580 100644
--- a/sys/amd64/amd64/sys_machdep.c
+++ b/sys/amd64/amd64/sys_machdep.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)sys_machdep.c 5.5 (Berkeley) 1/19/91
- * $Id: sys_machdep.c,v 1.37 1998/08/24 02:28:15 bde Exp $
+ * $Id: sys_machdep.c,v 1.38 1998/12/07 21:58:19 archie Exp $
*
*/
@@ -182,10 +182,10 @@ i386_set_ioperm(p, args)
struct i386_ioperm_args ua;
char *iomap;
- if (error = copyin(args, &ua, sizeof(struct i386_ioperm_args)))
+ if ((error = copyin(args, &ua, sizeof(struct i386_ioperm_args))) != 0)
return (error);
- if (error = suser(p->p_ucred, &p->p_acflag))
+ if ((error = suser(p->p_ucred, &p->p_acflag)) != 0)
return (error);
if (securelevel > 0)
return (EPERM);
@@ -197,7 +197,7 @@ i386_set_ioperm(p, args)
*/
if (p->p_addr->u_pcb.pcb_ext == 0)
- if (error = i386_extend_pcb(p))
+ if ((error = i386_extend_pcb(p)) != 0)
return (error);
iomap = (char *)p->p_addr->u_pcb.pcb_ext->ext_iomap;
@@ -222,7 +222,7 @@ i386_get_ioperm(p, args)
struct i386_ioperm_args ua;
char *iomap;
- if (error = copyin(args, &ua, sizeof(struct i386_ioperm_args)))
+ if ((error = copyin(args, &ua, sizeof(struct i386_ioperm_args))) != 0)
return (error);
if (ua.start >= IOPAGES * PAGE_SIZE * NBBY)
return (EINVAL);
diff --git a/sys/amd64/include/mptable.h b/sys/amd64/include/mptable.h
index 569f04b..bd188d3 100644
--- a/sys/amd64/include/mptable.h
+++ b/sys/amd64/include/mptable.h
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.87 1999/01/12 00:19:31 eivind Exp $
+ * $Id: mp_machdep.c,v 1.88 1999/01/20 04:24:22 jkh Exp $
*/
#include "opt_smp.h"
@@ -378,7 +378,7 @@ mp_probe(void)
POSTCODE(MP_PROBE_POST);
/* see if EBDA exists */
- if (segment = (u_long) * (u_short *) (KERNBASE + 0x40e)) {
+ if ((segment = (u_long) * (u_short *) (KERNBASE + 0x40e)) != 0) {
/* search first 1K of EBDA */
target = (u_int32_t) (segment << 4);
if ((x = search_for_sig(target, 1024 / 4)) >= 0)
diff --git a/sys/dev/cs/if_cs.c b/sys/dev/cs/if_cs.c
index 1ddfbca1..4a9c390 100644
--- a/sys/dev/cs/if_cs.c
+++ b/sys/dev/cs/if_cs.c
@@ -27,7 +27,7 @@
*/
/*
- * $Id: if_cs.c,v 1.7 1998/12/07 21:58:21 archie Exp $
+ * $Id: if_cs.c,v 1.8 1999/01/12 00:27:43 eivind Exp $
*
* Device driver for Crystal Semiconductor CS8920 based ethernet
* adapters. By Maxim Bolotin and Oleg Sharoiko, 27-April-1997
@@ -1215,11 +1215,11 @@ cs_mediaset(struct cs_softc *sc, int media)
case IFM_AUTO:
if ((error=enable_tp(sc))==0)
error = cs_duplex_auto(sc);
- else if (error=enable_bnc(sc))
+ else if ((error=enable_bnc(sc)) != 0)
error = enable_aui(sc);
break;
case IFM_10_T:
- if (error=enable_tp(sc))
+ if ((error=enable_tp(sc)) != 0)
break;
if (media & IFM_FDX)
cs_duplex_full(sc);
diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c
index 794d4d6..e95d7e6 100644
--- a/sys/dev/cy/cy.c
+++ b/sys/dev/cy/cy.c
@@ -27,7 +27,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: cy.c,v 1.82 1998/12/24 14:17:57 bde Exp $
+ * $Id: cy.c,v 1.83 1999/01/08 19:17:46 bde Exp $
*/
#include "opt_compat.h"
@@ -924,7 +924,7 @@ comhardclose(com)
enable_intr();
#endif
tp = com->tp;
- if (tp->t_cflag & HUPCL
+ if ((tp->t_cflag & HUPCL)
/*
* XXX we will miss any carrier drop between here and the
* next open. Perhaps we should watch DCD even when the
@@ -932,9 +932,9 @@ comhardclose(com)
* the next open because it might go up and down while
* we're not watching.
*/
- || !com->active_out
+ || (!com->active_out
&& !(com->prev_modem_status & MSR_DCD)
- && !(com->it_in.c_cflag & CLOCAL)
+ && !(com->it_in.c_cflag & CLOCAL))
|| !(tp->t_state & TS_ISOPEN)) {
(void)commctl(com, TIOCM_DTR, DMBIC);
@@ -1107,16 +1107,16 @@ siointr(unit)
*/
if ( com->tp == NULL
|| !(com->tp->t_state & TS_ISOPEN)
- || (line_status & (LSR_PE|LSR_FE))
- && (com->tp->t_iflag & IGNPAR)
- || (line_status & LSR_BI)
- && (com->tp->t_iflag & IGNBRK))
+ || ((line_status & (LSR_PE|LSR_FE))
+ && (com->tp->t_iflag & IGNPAR))
+ || ((line_status & LSR_BI)
+ && (com->tp->t_iflag & IGNBRK)))
goto cont;
if ( (line_status & (LSR_PE|LSR_FE))
&& (com->tp->t_state & TS_CAN_BYPASS_L_RINT)
&& ((line_status & LSR_FE)
- || (line_status & LSR_PE)
- && (com->tp->t_iflag & INPCK)))
+ || ((line_status & LSR_PE)
+ && (com->tp->t_iflag & INPCK))))
recv_data = 0;
}
#endif /* 1 */
@@ -1357,8 +1357,8 @@ cont:
*/
cd_outb(iobase, CD1400_SRER, cy_align,
com->intr_enable
- = com->intr_enable
- & ~CD1400_SRER_TXRDY
+ = (com->intr_enable
+ & ~CD1400_SRER_TXRDY)
| CD1400_SRER_TXMPTY);
goto terminate_tx_service;
}
@@ -1472,8 +1472,8 @@ cont:
cd_outb(iobase, CD1400_SRER, cy_align,
com->intr_enable
- = com->intr_enable
- & ~CD1400_SRER_TXRDY
+ = (com->intr_enable
+ & ~CD1400_SRER_TXRDY)
| CD1400_SRER_TXMPTY);
}
if (!(com->state & CS_ODONE)) {
@@ -2190,13 +2190,13 @@ comparam(tp, t)
if (!(com->intr_enable & CD1400_SRER_TXRDY))
cd_setreg(com, CD1400_SRER,
com->intr_enable
- = com->intr_enable & ~CD1400_SRER_TXMPTY
+ = (com->intr_enable & ~CD1400_SRER_TXMPTY)
| CD1400_SRER_TXRDY);
} else {
if (com->intr_enable & CD1400_SRER_TXRDY)
cd_setreg(com, CD1400_SRER,
com->intr_enable
- = com->intr_enable & ~CD1400_SRER_TXRDY
+ = (com->intr_enable & ~CD1400_SRER_TXRDY)
| CD1400_SRER_TXMPTY);
}
@@ -2232,7 +2232,7 @@ comstart(tp)
if (com->intr_enable & CD1400_SRER_TXRDY)
cd_setreg(com, CD1400_SRER,
com->intr_enable
- = com->intr_enable & ~CD1400_SRER_TXRDY
+ = (com->intr_enable & ~CD1400_SRER_TXRDY)
| CD1400_SRER_TXMPTY);
} else {
com->state |= CS_TTGO;
@@ -2240,7 +2240,7 @@ comstart(tp)
&& !(com->intr_enable & CD1400_SRER_TXRDY))
cd_setreg(com, CD1400_SRER,
com->intr_enable
- = com->intr_enable & ~CD1400_SRER_TXMPTY
+ = (com->intr_enable & ~CD1400_SRER_TXMPTY)
| CD1400_SRER_TXRDY);
}
if (tp->t_state & TS_TBLOCK) {
@@ -2296,8 +2296,8 @@ comstart(tp)
| CS_ODEVREADY))
cd_setreg(com, CD1400_SRER,
com->intr_enable
- = com->intr_enable
- & ~CD1400_SRER_TXMPTY
+ = (com->intr_enable
+ & ~CD1400_SRER_TXMPTY)
| CD1400_SRER_TXRDY);
}
enable_intr();
@@ -2326,8 +2326,8 @@ comstart(tp)
| CS_ODEVREADY))
cd_setreg(com, CD1400_SRER,
com->intr_enable
- = com->intr_enable
- & ~CD1400_SRER_TXMPTY
+ = (com->intr_enable
+ & ~CD1400_SRER_TXMPTY)
| CD1400_SRER_TXRDY);
}
enable_intr();
@@ -2724,19 +2724,19 @@ cd_etc(com, etc)
enable_intr();
goto wait;
}
- if (etc == CD1400_ETC_SENDBREAK
+ if ((etc == CD1400_ETC_SENDBREAK
&& (com->etc == ETC_BREAK_STARTING
- || com->etc == ETC_BREAK_STARTED)
- || etc == CD1400_ETC_STOPBREAK
+ || com->etc == ETC_BREAK_STARTED))
+ || (etc == CD1400_ETC_STOPBREAK
&& (com->etc == ETC_BREAK_ENDING || com->etc == ETC_BREAK_ENDED
- || com->etc == ETC_NONE)) {
+ || com->etc == ETC_NONE))) {
enable_intr();
return;
}
com->etc = etc;
cd_setreg(com, CD1400_SRER,
com->intr_enable
- = com->intr_enable & ~CD1400_SRER_TXRDY | CD1400_SRER_TXMPTY);
+ = (com->intr_enable & ~CD1400_SRER_TXRDY) | CD1400_SRER_TXMPTY);
enable_intr();
wait:
while (com->etc == etc
diff --git a/sys/dev/cy/cy_isa.c b/sys/dev/cy/cy_isa.c
index 794d4d6..e95d7e6 100644
--- a/sys/dev/cy/cy_isa.c
+++ b/sys/dev/cy/cy_isa.c
@@ -27,7 +27,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: cy.c,v 1.82 1998/12/24 14:17:57 bde Exp $
+ * $Id: cy.c,v 1.83 1999/01/08 19:17:46 bde Exp $
*/
#include "opt_compat.h"
@@ -924,7 +924,7 @@ comhardclose(com)
enable_intr();
#endif
tp = com->tp;
- if (tp->t_cflag & HUPCL
+ if ((tp->t_cflag & HUPCL)
/*
* XXX we will miss any carrier drop between here and the
* next open. Perhaps we should watch DCD even when the
@@ -932,9 +932,9 @@ comhardclose(com)
* the next open because it might go up and down while
* we're not watching.
*/
- || !com->active_out
+ || (!com->active_out
&& !(com->prev_modem_status & MSR_DCD)
- && !(com->it_in.c_cflag & CLOCAL)
+ && !(com->it_in.c_cflag & CLOCAL))
|| !(tp->t_state & TS_ISOPEN)) {
(void)commctl(com, TIOCM_DTR, DMBIC);
@@ -1107,16 +1107,16 @@ siointr(unit)
*/
if ( com->tp == NULL
|| !(com->tp->t_state & TS_ISOPEN)
- || (line_status & (LSR_PE|LSR_FE))
- && (com->tp->t_iflag & IGNPAR)
- || (line_status & LSR_BI)
- && (com->tp->t_iflag & IGNBRK))
+ || ((line_status & (LSR_PE|LSR_FE))
+ && (com->tp->t_iflag & IGNPAR))
+ || ((line_status & LSR_BI)
+ && (com->tp->t_iflag & IGNBRK)))
goto cont;
if ( (line_status & (LSR_PE|LSR_FE))
&& (com->tp->t_state & TS_CAN_BYPASS_L_RINT)
&& ((line_status & LSR_FE)
- || (line_status & LSR_PE)
- && (com->tp->t_iflag & INPCK)))
+ || ((line_status & LSR_PE)
+ && (com->tp->t_iflag & INPCK))))
recv_data = 0;
}
#endif /* 1 */
@@ -1357,8 +1357,8 @@ cont:
*/
cd_outb(iobase, CD1400_SRER, cy_align,
com->intr_enable
- = com->intr_enable
- & ~CD1400_SRER_TXRDY
+ = (com->intr_enable
+ & ~CD1400_SRER_TXRDY)
| CD1400_SRER_TXMPTY);
goto terminate_tx_service;
}
@@ -1472,8 +1472,8 @@ cont:
cd_outb(iobase, CD1400_SRER, cy_align,
com->intr_enable
- = com->intr_enable
- & ~CD1400_SRER_TXRDY
+ = (com->intr_enable
+ & ~CD1400_SRER_TXRDY)
| CD1400_SRER_TXMPTY);
}
if (!(com->state & CS_ODONE)) {
@@ -2190,13 +2190,13 @@ comparam(tp, t)
if (!(com->intr_enable & CD1400_SRER_TXRDY))
cd_setreg(com, CD1400_SRER,
com->intr_enable
- = com->intr_enable & ~CD1400_SRER_TXMPTY
+ = (com->intr_enable & ~CD1400_SRER_TXMPTY)
| CD1400_SRER_TXRDY);
} else {
if (com->intr_enable & CD1400_SRER_TXRDY)
cd_setreg(com, CD1400_SRER,
com->intr_enable
- = com->intr_enable & ~CD1400_SRER_TXRDY
+ = (com->intr_enable & ~CD1400_SRER_TXRDY)
| CD1400_SRER_TXMPTY);
}
@@ -2232,7 +2232,7 @@ comstart(tp)
if (com->intr_enable & CD1400_SRER_TXRDY)
cd_setreg(com, CD1400_SRER,
com->intr_enable
- = com->intr_enable & ~CD1400_SRER_TXRDY
+ = (com->intr_enable & ~CD1400_SRER_TXRDY)
| CD1400_SRER_TXMPTY);
} else {
com->state |= CS_TTGO;
@@ -2240,7 +2240,7 @@ comstart(tp)
&& !(com->intr_enable & CD1400_SRER_TXRDY))
cd_setreg(com, CD1400_SRER,
com->intr_enable
- = com->intr_enable & ~CD1400_SRER_TXMPTY
+ = (com->intr_enable & ~CD1400_SRER_TXMPTY)
| CD1400_SRER_TXRDY);
}
if (tp->t_state & TS_TBLOCK) {
@@ -2296,8 +2296,8 @@ comstart(tp)
| CS_ODEVREADY))
cd_setreg(com, CD1400_SRER,
com->intr_enable
- = com->intr_enable
- & ~CD1400_SRER_TXMPTY
+ = (com->intr_enable
+ & ~CD1400_SRER_TXMPTY)
| CD1400_SRER_TXRDY);
}
enable_intr();
@@ -2326,8 +2326,8 @@ comstart(tp)
| CS_ODEVREADY))
cd_setreg(com, CD1400_SRER,
com->intr_enable
- = com->intr_enable
- & ~CD1400_SRER_TXMPTY
+ = (com->intr_enable
+ & ~CD1400_SRER_TXMPTY)
| CD1400_SRER_TXRDY);
}
enable_intr();
@@ -2724,19 +2724,19 @@ cd_etc(com, etc)
enable_intr();
goto wait;
}
- if (etc == CD1400_ETC_SENDBREAK
+ if ((etc == CD1400_ETC_SENDBREAK
&& (com->etc == ETC_BREAK_STARTING
- || com->etc == ETC_BREAK_STARTED)
- || etc == CD1400_ETC_STOPBREAK
+ || com->etc == ETC_BREAK_STARTED))
+ || (etc == CD1400_ETC_STOPBREAK
&& (com->etc == ETC_BREAK_ENDING || com->etc == ETC_BREAK_ENDED
- || com->etc == ETC_NONE)) {
+ || com->etc == ETC_NONE))) {
enable_intr();
return;
}
com->etc = etc;
cd_setreg(com, CD1400_SRER,
com->intr_enable
- = com->intr_enable & ~CD1400_SRER_TXRDY | CD1400_SRER_TXMPTY);
+ = (com->intr_enable & ~CD1400_SRER_TXRDY) | CD1400_SRER_TXMPTY);
enable_intr();
wait:
while (com->etc == etc
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c
index 9133a48..e7bab24 100644
--- a/sys/dev/ed/if_ed.c
+++ b/sys/dev/ed/if_ed.c
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_ed.c,v 1.147 1998/12/13 23:00:48 eivind Exp $
+ * $Id: if_ed.c,v 1.148 1999/01/19 00:21:38 peter Exp $
*/
/*
@@ -3211,7 +3211,7 @@ ed_hpp_write_mbufs(struct ed_softc *sc, struct mbuf *m, int dst)
len &= 1;
}
/* save last byte if needed */
- if (wantbyte = (len == 1))
+ if ((wantbyte = (len == 1)) != 0)
savebyte[0] = *data;
}
m = m->m_next; /* to next mbuf */
@@ -3247,7 +3247,7 @@ ed_hpp_write_mbufs(struct ed_softc *sc, struct mbuf *m, int dst)
data += (len & ~1);
len &= 1;
}
- if (wantbyte = (len == 1))
+ if ((wantbyte = (len == 1)) != 0)
savebyte[0] = *data;
} /* if len != 0 */
diff --git a/sys/dev/ex/if_ex.c b/sys/dev/ex/if_ex.c
index 2508bd7..0b689be 100644
--- a/sys/dev/ex/if_ex.c
+++ b/sys/dev/ex/if_ex.c
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_ex.c,v 1.12 1998/06/07 17:10:30 dfr Exp $
+ * $Id: if_ex.c,v 1.13 1998/10/22 05:58:39 bde Exp $
*/
/*
@@ -476,7 +476,7 @@ void ex_start(struct ifnet *ifp)
outsw(iobase + IO_PORT_REG, tmp16, 1);
}
outsw(iobase + IO_PORT_REG, mtod(m, caddr_t) + i, (m->m_len - i) / 2);
- if (i = (m->m_len - i) & 1)
+ if ((i = (m->m_len - i) & 1) != 0)
tmp16[0] = *(mtod(m, caddr_t) + m->m_len - 1);
}
if (i)
diff --git a/sys/dev/ie/if_ie.c b/sys/dev/ie/if_ie.c
index 4b22ae5..06db700 100644
--- a/sys/dev/ie/if_ie.c
+++ b/sys/dev/ie/if_ie.c
@@ -47,7 +47,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_ie.c,v 1.57 1998/10/22 05:58:39 bde Exp $
+ * $Id: if_ie.c,v 1.58 1998/12/10 01:49:49 archie Exp $
*/
/*
@@ -211,15 +211,15 @@ static void find_ie_mem_size(int unit);
static void chan_attn_timeout(void *rock);
static int command_and_wait(int unit, int command,
void volatile * pcmd, int);
-static void run_tdr(int unit, struct ie_tdr_cmd * cmd);
+static void run_tdr(int unit, volatile struct ie_tdr_cmd * cmd);
static int ierint(int unit, struct ie_softc * ie);
static int ietint(int unit, struct ie_softc * ie);
static int iernr(int unit, struct ie_softc * ie);
static void start_receiver(int unit);
static __inline int ieget(int, struct ie_softc *, struct mbuf **,
struct ether_header *, int *);
-static caddr_t setup_rfa(caddr_t ptr, struct ie_softc * ie);
-static int mc_setup(int, caddr_t, volatile struct ie_sys_ctl_block *);
+static v_caddr_t setup_rfa(v_caddr_t ptr, struct ie_softc * ie);
+static int mc_setup(int, v_caddr_t, volatile struct ie_sys_ctl_block *);
static void ie_mc_reset(int unit);
#ifdef DEBUG
@@ -317,7 +317,7 @@ static struct ie_softc {
volatile struct ie_xmit_cmd **xmit_cmds; /* ntxbufs worth */
volatile struct ie_xmit_buf **xmit_buffs; /* ntxbufs worth */
- u_char **xmit_cbuffs; /* ntxbufs worth */
+ volatile u_char **xmit_cbuffs; /* ntxbufs worth */
int xmit_count;
struct ie_en_addr mcast_addrs[MAXMCAST + 1];
@@ -820,7 +820,7 @@ ieattach(struct isa_device *dvp)
(volatile struct ie_xmit_cmd **)&ie->cbuffs[ie->nrxbufs];
ie->xmit_buffs =
(volatile struct ie_xmit_buf **)&ie->xmit_cmds[ie->ntxbufs];
- ie->xmit_cbuffs = (u_char **)&ie->xmit_buffs[ie->ntxbufs];
+ ie->xmit_cbuffs = (volatile u_char **)&ie->xmit_buffs[ie->ntxbufs];
ifp->if_softc = ie;
ifp->if_unit = unit;
@@ -1017,7 +1017,7 @@ ietint(int unit, struct ie_softc *ie)
* that we should do it.
*/
if (ie->want_mcsetup) {
- mc_setup(unit, (caddr_t) ie->xmit_cbuffs[0], ie->scb);
+ mc_setup(unit, (v_caddr_t) ie->xmit_cbuffs[0], ie->scb);
ie->want_mcsetup = 0;
}
/* Wish I knew why this seems to be necessary... */
@@ -1036,14 +1036,14 @@ static int
iernr(int unit, struct ie_softc *ie)
{
#ifdef doesnt_work
- setup_rfa((caddr_t) ie->rframes[0], ie);
+ setup_rfa((v_caddr_t) ie->rframes[0], ie);
ie->scb->ie_recv_list = MK_16(MEM, ie_softc[unit].rframes[0]);
command_and_wait(unit, IE_RU_START, 0, 0);
#else
/* This doesn't work either, but it doesn't hang either. */
command_and_wait(unit, IE_RU_DISABLE, 0, 0); /* just in case */
- setup_rfa((caddr_t) ie->rframes[0], ie); /* ignore cast-qual */
+ setup_rfa((v_caddr_t) ie->rframes[0], ie); /* ignore cast-qual */
ie->scb->ie_recv_list = MK_16(MEM, ie_softc[unit].rframes[0]);
command_and_wait(unit, IE_RU_START, 0, 0); /* was ENABLE */
@@ -1260,7 +1260,7 @@ ieget(int unit, struct ie_softc *ie, struct mbuf **mp,
/*
* Snarf the Ethernet header.
*/
- bcopy((caddr_t) ie->cbuffs[i], (caddr_t) ehp, sizeof *ehp);
+ bcopy((v_caddr_t) ie->cbuffs[i], (caddr_t) ehp, sizeof *ehp);
/* ignore cast-qual warning here */
/*
@@ -1348,8 +1348,8 @@ ieget(int unit, struct ie_softc *ie, struct mbuf **mp,
if (thislen > m->m_len - thismboff) {
int newlen = m->m_len - thismboff;
- bcopy((caddr_t) (ie->cbuffs[head] + offset),
- mtod(m, caddr_t) +thismboff, (unsigned) newlen);
+ bcopy((v_caddr_t) (ie->cbuffs[head] + offset),
+ mtod(m, v_caddr_t) +thismboff, (unsigned) newlen);
/* ignore cast-qual warning */
m = m->m_next;
thismboff = 0; /* new mbuf, so no offset */
@@ -1365,7 +1365,7 @@ ieget(int unit, struct ie_softc *ie, struct mbuf **mp,
* pointers, and so on.
*/
if (thislen < m->m_len - thismboff) {
- bcopy((caddr_t) (ie->cbuffs[head] + offset),
+ bcopy((v_caddr_t) (ie->cbuffs[head] + offset),
mtod(m, caddr_t) +thismboff, (unsigned) thislen);
thismboff += thislen; /* we are this far into the
* mbuf */
@@ -1377,7 +1377,7 @@ ieget(int unit, struct ie_softc *ie, struct mbuf **mp,
* buffer's contents into the current mbuf. Do the
* combination of the above actions.
*/
- bcopy((caddr_t) (ie->cbuffs[head] + offset),
+ bcopy((v_caddr_t) (ie->cbuffs[head] + offset),
mtod(m, caddr_t) + thismboff, (unsigned) thislen);
m = m->m_next;
thismboff = 0; /* new mbuf, start at the beginning */
@@ -1425,7 +1425,7 @@ ie_readframe(int unit, struct ie_softc *ie, int num/* frame number to read */)
#endif
- bcopy((caddr_t) (ie->rframes[num]), &rfd,
+ bcopy((v_caddr_t) (ie->rframes[num]), &rfd,
sizeof(struct ie_recv_frame_desc));
/*
@@ -1547,7 +1547,7 @@ iestart(struct ifnet *ifp)
{
struct ie_softc *ie = ifp->if_softc;
struct mbuf *m0, *m;
- unsigned char *buffer;
+ volatile unsigned char *buffer;
u_short len;
/*
@@ -1585,7 +1585,7 @@ iestart(struct ifnet *ifp)
*/
if (ie->arpcom.ac_if.if_bpf)
bpf_tap(&ie->arpcom.ac_if,
- ie->xmit_cbuffs[ie->xmit_count], len);
+ (void *)ie->xmit_cbuffs[ie->xmit_count], len);
#endif
ie->xmit_buffs[ie->xmit_count]->ie_xmit_flags =
@@ -1640,7 +1640,7 @@ check_ie_present(int unit, caddr_t where, unsigned size)
scp = (volatile struct ie_sys_conf_ptr *) (uintptr_t)
(realbase + IE_SCP_ADDR);
- bzero((char *) scp, sizeof *scp);
+ bzero((volatile char *) scp, sizeof *scp);
/*
* First we put the ISCP at the bottom of memory; this tests to make
@@ -1649,13 +1649,13 @@ check_ie_present(int unit, caddr_t where, unsigned size)
* operation.
*/
iscp = (volatile struct ie_int_sys_conf_ptr *) where;
- bzero((char *)iscp, sizeof *iscp);
+ bzero((volatile char *)iscp, sizeof *iscp);
scb = (volatile struct ie_sys_ctl_block *) where;
- bzero((char *)scb, sizeof *scb);
+ bzero((volatile char *)scb, sizeof *scb);
scp->ie_bus_use = ie_softc[unit].bus_use; /* 8-bit or 16-bit */
- scp->ie_iscp_ptr = (caddr_t) ((volatile caddr_t) iscp -
+ scp->ie_iscp_ptr = (v_caddr_t) ((volatile caddr_t) iscp -
(volatile caddr_t) (volatile uintptr_t)
realbase);
@@ -1678,10 +1678,10 @@ check_ie_present(int unit, caddr_t where, unsigned size)
iscp = (void *) Align((caddr_t) (uintptr_t)
(realbase + IE_SCP_ADDR -
sizeof(struct ie_int_sys_conf_ptr)));
- bzero((char *) iscp, sizeof *iscp); /* ignore cast-qual */
+ bzero((volatile char *) iscp, sizeof *iscp); /* ignore cast-qual */
- scp->ie_iscp_ptr = (caddr_t) ((caddr_t) iscp -
- (caddr_t) (uintptr_t) realbase);
+ scp->ie_iscp_ptr = (v_caddr_t) ((v_caddr_t) iscp -
+ (v_caddr_t) (uintptr_t) realbase);
/* ignore cast-qual */
iscp->ie_busy = 1;
@@ -1973,7 +1973,7 @@ command_and_wait(int unit, int cmd, volatile void *pcmd, int mask)
* Run the time-domain reflectometer...
*/
static void
-run_tdr(int unit, struct ie_tdr_cmd *cmd)
+run_tdr(int unit, volatile struct ie_tdr_cmd *cmd)
{
int result;
@@ -2026,10 +2026,10 @@ start_receiver(int unit)
* Here is a helper routine for iernr() and ieinit(). This sets up
* the RFA.
*/
-static caddr_t
-setup_rfa(caddr_t ptr, struct ie_softc * ie)
+static v_caddr_t
+setup_rfa(v_caddr_t ptr, struct ie_softc * ie)
{
- volatile struct ie_recv_frame_desc *rfd = (void *) ptr;
+ volatile struct ie_recv_frame_desc *rfd = (volatile void *)ptr;
volatile struct ie_recv_buf_desc *rbd;
int i;
int unit = ie - &ie_softc[0];
@@ -2037,11 +2037,11 @@ setup_rfa(caddr_t ptr, struct ie_softc * ie)
/* First lay them out */
for (i = 0; i < ie->nframes; i++) {
ie->rframes[i] = rfd;
- bzero((char *) rfd, sizeof *rfd); /* ignore cast-qual */
+ bzero((volatile char *) rfd, sizeof *rfd); /* ignore cast-qual */
rfd++;
}
- ptr = (caddr_t) Align((caddr_t) rfd); /* ignore cast-qual */
+ ptr = (v_caddr_t) Align((v_caddr_t) rfd); /* ignore cast-qual */
/* Now link them together */
for (i = 0; i < ie->nframes; i++) {
@@ -2057,17 +2057,17 @@ setup_rfa(caddr_t ptr, struct ie_softc * ie)
* set aside a bit of slop in each buffer, to make sure that we have
* enough space to hold a single frame in every buffer.
*/
- rbd = (void *) ptr;
+ rbd = (volatile void *) ptr;
for (i = 0; i < ie->nrxbufs; i++) {
ie->rbuffs[i] = rbd;
- bzero((char *)rbd, sizeof *rbd);
+ bzero((volatile char *)rbd, sizeof *rbd);
ptr = (caddr_t) Align(ptr + sizeof *rbd);
rbd->ie_rbd_length = IE_RBUF_SIZE;
rbd->ie_rbd_buffer = MK_24(MEM, ptr);
- ie->cbuffs[i] = (void *) ptr;
+ ie->cbuffs[i] = (volatile void *) ptr;
ptr += IE_RBUF_SIZE;
- rbd = (void *) ptr;
+ rbd = (volatile void *) ptr;
}
/* Now link them together */
@@ -2100,18 +2100,18 @@ setup_rfa(caddr_t ptr, struct ie_softc * ie)
* Call at splimp().
*/
static int
-mc_setup(int unit, caddr_t ptr,
+mc_setup(int unit, v_caddr_t ptr,
volatile struct ie_sys_ctl_block * scb)
{
struct ie_softc *ie = &ie_softc[unit];
- volatile struct ie_mcast_cmd *cmd = (void *) ptr;
+ volatile struct ie_mcast_cmd *cmd = (volatile void *) ptr;
cmd->com.ie_cmd_status = 0;
cmd->com.ie_cmd_cmd = IE_CMD_MCAST | IE_CMD_LAST;
cmd->com.ie_cmd_link = 0xffff;
/* ignore cast-qual */
- bcopy((caddr_t) ie->mcast_addrs, (caddr_t) cmd->ie_mcast_addrs,
+ bcopy((v_caddr_t) ie->mcast_addrs, (v_caddr_t) cmd->ie_mcast_addrs,
ie->mcast_count * sizeof *ie->mcast_addrs);
cmd->ie_mcast_bytes = ie->mcast_count * 6; /* grrr... */
@@ -2138,16 +2138,16 @@ ieinit(int unit)
{
struct ie_softc *ie = &ie_softc[unit];
volatile struct ie_sys_ctl_block *scb = ie->scb;
- caddr_t ptr;
+ v_caddr_t ptr;
int i;
- ptr = (caddr_t) Align((caddr_t) scb + sizeof *scb);
+ ptr = (v_caddr_t) Align((v_caddr_t) scb + sizeof *scb);
/*
* Send the configure command first.
*/
{
- volatile struct ie_config_cmd *cmd = (void *) ptr;
+ volatile struct ie_config_cmd *cmd = (volatile void *) ptr;
ie_setup_config(cmd, ie->promisc,
ie->hard_type == IE_STARLAN10);
@@ -2167,14 +2167,14 @@ ieinit(int unit)
* Now send the Individual Address Setup command.
*/
{
- volatile struct ie_iasetup_cmd *cmd = (void *) ptr;
+ volatile struct ie_iasetup_cmd *cmd = (volatile void *) ptr;
cmd->com.ie_cmd_status = 0;
cmd->com.ie_cmd_cmd = IE_CMD_IASETUP | IE_CMD_LAST;
cmd->com.ie_cmd_link = 0xffff;
- bcopy((char *)ie_softc[unit].arpcom.ac_enaddr,
- (char *)&cmd->ie_address, sizeof cmd->ie_address);
+ bcopy((volatile char *)ie_softc[unit].arpcom.ac_enaddr,
+ (volatile char *)&cmd->ie_address, sizeof cmd->ie_address);
scb->ie_command_list = MK_16(MEM, cmd);
if (command_and_wait(unit, IE_CU_START, cmd, IE_STAT_COMPL)
|| !(cmd->com.ie_cmd_status & IE_STAT_OK)) {
@@ -2187,7 +2187,7 @@ ieinit(int unit)
/*
* Now run the time-domain reflectometer.
*/
- run_tdr(unit, (void *) ptr);
+ run_tdr(unit, (volatile void *) ptr);
/*
* Acknowledge any interrupts we have generated thus far.
@@ -2206,25 +2206,25 @@ ieinit(int unit)
/* transmit command buffers */
for (i = 0; i < ie->ntxbufs; i++) {
- ie->xmit_cmds[i] = (void *) ptr;
+ ie->xmit_cmds[i] = (volatile void *) ptr;
ptr += sizeof *ie->xmit_cmds[i];
ptr = Align(ptr);
- ie->xmit_buffs[i] = (void *)ptr;
+ ie->xmit_buffs[i] = (volatile void *)ptr;
ptr += sizeof *ie->xmit_buffs[i];
ptr = Align(ptr);
}
/* transmit buffers */
for (i = 0; i < ie->ntxbufs - 1; i++) {
- ie->xmit_cbuffs[i] = (void *)ptr;
+ ie->xmit_cbuffs[i] = (volatile void *)ptr;
ptr += IE_BUF_LEN;
ptr = Align(ptr);
}
- ie->xmit_cbuffs[ie->ntxbufs - 1] = (void *) ptr;
+ ie->xmit_cbuffs[ie->ntxbufs - 1] = (volatile void *) ptr;
for (i = 1; i < ie->ntxbufs; i++) {
- bzero((caddr_t) ie->xmit_cmds[i], sizeof *ie->xmit_cmds[i]);
- bzero((caddr_t) ie->xmit_buffs[i], sizeof *ie->xmit_buffs[i]);
+ bzero((v_caddr_t) ie->xmit_cmds[i], sizeof *ie->xmit_cmds[i]);
+ bzero((v_caddr_t) ie->xmit_buffs[i], sizeof *ie->xmit_buffs[i]);
}
/*
@@ -2426,7 +2426,7 @@ print_rbd(volatile struct ie_recv_buf_desc * rbd)
printf("RBD at %p:\n"
"actual %04x, next %04x, buffer %p\n"
"length %04x, mbz %04x\n",
- (void *) rbd,
+ (volatile void *) rbd,
rbd->ie_rbd_actual, rbd->ie_rbd_next,
(void *) rbd->ie_rbd_buffer,
rbd->ie_rbd_length, rbd->mbz);
diff --git a/sys/dev/kbd/kbdtables.h b/sys/dev/kbd/kbdtables.h
index c0d4663..8327182 100644
--- a/sys/dev/kbd/kbdtables.h
+++ b/sys/dev/kbd/kbdtables.h
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: kbdtables.h,v 1.41 1998/09/15 18:16:37 sos Exp $
+ * $Id: kbdtables.h,v 1.42 1998/11/18 08:33:58 kato Exp $
*/
#define SET8 0x80 /* set eight bit on */
@@ -1132,7 +1132,7 @@ static keymap_t key_map = { 0x6C, /* icelandic iso8859 keymap */
#if !defined(DKKEYMAP) && !defined(UKKEYMAP) && !defined(GRKEYMAP) && !defined(SWKEYMAP) && !defined(RUKEYMAP) && !defined(ISKEYMAP) && !defined(ESKEYMAP) && !defined(PC98)
#define ISO_ACCENTCHARS
-static keymap_t key_map = { 0x6C, /* US iso8859 keymap */
+static keymap_t key_map = { 0x6C, { /* US iso8859 keymap */
/* alt
* scan cntrl alt alt cntrl
* code base shift cntrl shift alt shift cntrl shift spcl flgs
@@ -1246,7 +1246,7 @@ static keymap_t key_map = { 0x6C, /* US iso8859 keymap */
/* sc=69 */ F(62), F(62), F(62), F(62), F(62), F(62), F(62), F(62), 0xFF, 0x00,
/* sc=6a */ F(63), F(63), F(63), F(63), F(63), F(63), F(63), F(63), 0xFF, 0x00,
/* sc=6b */ F(64), F(64), F(64), F(64), F(64), F(64), F(64), F(64), 0xFF, 0x00,
-};
+} };
#endif
#if defined(NO_ACCENTCHARS)
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index cfde5f0..e269df0 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: syscons.c,v 1.293 1999/01/19 11:31:18 yokota Exp $
+ * $Id: syscons.c,v 1.294 1999/01/26 09:58:37 yokota Exp $
*/
#include "sc.h"
@@ -438,7 +438,7 @@ draw_cursor_image(scr_stat *scp)
cursor_image |= DEAD_CHAR;
}
} else {
- cursor_image = (readw(ptr) & 0x00ff) | *(scp->cursor_pos) & 0xff00;
+ cursor_image = (readw(ptr) & 0x00ff) | (*(scp->cursor_pos) & 0xff00);
scp->cursor_saveunder = cursor_image;
if (!(sc_flags & BLINK_CURSOR)||((sc_flags & BLINK_CURSOR)&&(blinkrate & 4))){
if ((cursor_image & 0x7000) == 0x7000) {
diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c
index b0fb1a7..7724ece 100644
--- a/sys/dev/usb/ucom.c
+++ b/sys/dev/usb/ucom.c
@@ -96,8 +96,8 @@ USB_MATCH(ucom)
if (!uaa->iface)
return (UMATCH_NONE);
id = usbd_get_interface_descriptor(uaa->iface);
- if (id &&
- id->bInterfaceClass != UCLASS_CDC ||
+ if ((id &&
+ id->bInterfaceClass != UCLASS_CDC) ||
id->bInterfaceSubClass != USUBCLASS_ABSTRACT_CONTROL_MODEL)
return (UMATCH_NONE);
return (UMATCH_IFACECLASS_IFACESUBCLASS);
@@ -124,12 +124,12 @@ USB_ATTACH(ucom)
static int
ucom_detach(device_t self)
{
- char *devinfo = (char *) device_get_desc(self);
+ const char *devinfo = device_get_desc(self);
DPRINTF(("%s: disconnected\n", USBDEVNAME(self)));
if (devinfo) {
device_set_desc(self, NULL);
- free(devinfo, M_USB);
+ free((void *)devinfo, M_USB);
}
return 0;
}
diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c
index 2f2fdb1..a34ee70 100644
--- a/sys/dev/usb/uhid.c
+++ b/sys/dev/usb/uhid.c
@@ -200,12 +200,12 @@ USB_ATTACH(uhid)
static int
uhid_detach(device_t self)
{
- char *devinfo = (char *) device_get_desc(self);
+ const char *devinfo = device_get_desc(self);
DPRINTF(("%s: disconnected\n", USBDEVNAME(self)));
if (devinfo) {
device_set_desc(self, NULL);
- free(devinfo, M_USB);
+ free((void *)devinfo, M_USB);
}
return 0;
}
diff --git a/sys/dev/usb/ukbd.c b/sys/dev/usb/ukbd.c
index 6bb1731..194afb4 100644
--- a/sys/dev/usb/ukbd.c
+++ b/sys/dev/usb/ukbd.c
@@ -362,7 +362,7 @@ int
ukbd_detach(device_t self)
{
struct ukbd_softc *sc = device_get_softc(self);
- char *devinfo = (char *) device_get_desc(self);
+ const char *devinfo = device_get_desc(self);
DPRINTF(("%s: disconnected\n", USBDEVNAME(self)));
if (sc->sc_enabled)
@@ -370,7 +370,7 @@ ukbd_detach(device_t self)
if (devinfo) {
device_set_desc(self, NULL);
- free(devinfo, M_USB);
+ free((void *)devinfo, M_USB);
}
return (0);
diff --git a/sys/dev/usb/ulpt.c b/sys/dev/usb/ulpt.c
index 29e413f..ed7b2f3 100644
--- a/sys/dev/usb/ulpt.c
+++ b/sys/dev/usb/ulpt.c
@@ -437,12 +437,12 @@ ulptioctl(dev, cmd, data, flag, p)
static int
ulpt_detach(device_t self)
{
- char *devinfo = (char *) device_get_desc(self);
+ const char *devinfo = device_get_desc(self);
DPRINTF(("%s: disconnected\n", USBDEVNAME(self)));
if (devinfo) {
device_set_desc(self, NULL);
- free(devinfo, M_USB);
+ free((void *)devinfo, M_USB);
}
return 0;
}
diff --git a/sys/dev/usb/umodem.c b/sys/dev/usb/umodem.c
index bbc162e..4ec326e 100644
--- a/sys/dev/usb/umodem.c
+++ b/sys/dev/usb/umodem.c
@@ -125,12 +125,12 @@ USB_ATTACH(umodem)
static int
umodem_detach(device_t self)
{
- char *devinfo = (char *) device_get_desc(self);
+ const char *devinfo = device_get_desc(self);
DPRINTF(("%s: disconnected\n", USBDEVNAME(self)));
if (devinfo) {
device_set_desc(self, NULL);
- free(devinfo, M_USB);
+ free((void *)devinfo, M_USB);
}
return 0;
diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c
index ac0ad99..b686f9f 100644
--- a/sys/dev/usb/ums.c
+++ b/sys/dev/usb/ums.c
@@ -375,7 +375,7 @@ static int
ums_detach(device_t self)
{
struct ums_softc *sc = device_get_softc(self);
- char *devinfo = (char *) device_get_desc(self);
+ const char *devinfo = device_get_desc(self);
if (sc->sc_enabled) {
usbd_abort_pipe(sc->sc_intrpipe);
@@ -386,7 +386,7 @@ ums_detach(device_t self)
DPRINTF(("%s: disconnected\n", USBDEVNAME(self)));
if (devinfo) {
device_set_desc(self, NULL);
- free(devinfo, M_USB);
+ free((void *)devinfo, M_USB);
}
free(sc->sc_loc_btn, M_USB);
free(sc->sc_ibuf, M_USB);
diff --git a/sys/i386/i386/db_disasm.c b/sys/i386/i386/db_disasm.c
index 0917ba0..b3b30b1 100644
--- a/sys/i386/i386/db_disasm.c
+++ b/sys/i386/i386/db_disasm.c
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: db_disasm.c,v 1.20 1997/04/01 16:22:31 bde Exp $
+ * $Id: db_disasm.c,v 1.21 1998/07/08 10:53:56 bde Exp $
*/
/*
@@ -834,9 +834,9 @@ static const char * const db_index_reg_16[8] = {
};
static const char * const db_reg[3][8] = {
- "%al", "%cl", "%dl", "%bl", "%ah", "%ch", "%dh", "%bh",
- "%ax", "%cx", "%dx", "%bx", "%sp", "%bp", "%si", "%di",
- "%eax", "%ecx", "%edx", "%ebx", "%esp", "%ebp", "%esi", "%edi"
+ { "%al", "%cl", "%dl", "%bl", "%ah", "%ch", "%dh", "%bh" },
+ { "%ax", "%cx", "%dx", "%bx", "%sp", "%bp", "%si", "%di" },
+ { "%eax", "%ecx", "%edx", "%ebx", "%esp", "%ebp", "%esi", "%edi" }
};
static const char * const db_seg_reg[8] = {
diff --git a/sys/i386/i386/db_trace.c b/sys/i386/i386/db_trace.c
index 608dd5d..2ad054f 100644
--- a/sys/i386/i386/db_trace.c
+++ b/sys/i386/i386/db_trace.c
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: db_trace.c,v 1.31 1998/07/15 11:27:11 bde Exp $
+ * $Id: db_trace.c,v 1.32 1999/01/27 23:45:38 dillon Exp $
*/
#include <sys/param.h>
@@ -44,24 +44,24 @@
* Machine register set.
*/
struct db_variable db_regs[] = {
- "cs", &ddb_regs.tf_cs, FCN_NULL,
- "ds", &ddb_regs.tf_ds, FCN_NULL,
- "es", &ddb_regs.tf_es, FCN_NULL,
+ { "cs", &ddb_regs.tf_cs, FCN_NULL },
+ { "ds", &ddb_regs.tf_ds, FCN_NULL },
+ { "es", &ddb_regs.tf_es, FCN_NULL },
#if 0
- "fs", &ddb_regs.tf_fs, FCN_NULL,
- "gs", &ddb_regs.tf_gs, FCN_NULL,
+ { "fs", &ddb_regs.tf_fs, FCN_NULL },
+ { "gs", &ddb_regs.tf_gs, FCN_NULL },
#endif
- "ss", &ddb_regs.tf_ss, FCN_NULL,
- "eax", &ddb_regs.tf_eax, FCN_NULL,
- "ecx", &ddb_regs.tf_ecx, FCN_NULL,
- "edx", &ddb_regs.tf_edx, FCN_NULL,
- "ebx", &ddb_regs.tf_ebx, FCN_NULL,
- "esp", &ddb_regs.tf_esp, FCN_NULL,
- "ebp", &ddb_regs.tf_ebp, FCN_NULL,
- "esi", &ddb_regs.tf_esi, FCN_NULL,
- "edi", &ddb_regs.tf_edi, FCN_NULL,
- "eip", &ddb_regs.tf_eip, FCN_NULL,
- "efl", &ddb_regs.tf_eflags, FCN_NULL,
+ { "ss", &ddb_regs.tf_ss, FCN_NULL },
+ { "eax", &ddb_regs.tf_eax, FCN_NULL },
+ { "ecx", &ddb_regs.tf_ecx, FCN_NULL },
+ { "edx", &ddb_regs.tf_edx, FCN_NULL },
+ { "ebx", &ddb_regs.tf_ebx, FCN_NULL },
+ { "esp", &ddb_regs.tf_esp, FCN_NULL },
+ { "ebp", &ddb_regs.tf_ebp, FCN_NULL },
+ { "esi", &ddb_regs.tf_esi, FCN_NULL },
+ { "edi", &ddb_regs.tf_edi, FCN_NULL },
+ { "eip", &ddb_regs.tf_eip, FCN_NULL },
+ { "efl", &ddb_regs.tf_eflags, FCN_NULL },
};
struct db_variable *db_eregs = db_regs + sizeof(db_regs)/sizeof(db_regs[0]);
diff --git a/sys/i386/i386/elf_machdep.c b/sys/i386/i386/elf_machdep.c
index aad9d89..2814f06 100644
--- a/sys/i386/i386/elf_machdep.c
+++ b/sys/i386/i386/elf_machdep.c
@@ -22,7 +22,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: elf_machdep.c,v 1.3 1998/10/16 03:54:59 peter Exp $
+ * $Id: elf_machdep.c,v 1.4 1998/12/07 21:58:18 archie Exp $
*/
#include <sys/param.h>
@@ -50,13 +50,13 @@ elf_reloc(linker_file_t lf, const void *data, int type, const char *sym)
switch (type) {
case ELF_RELOC_REL:
- rel = (Elf_Rel *)data;
+ rel = (const Elf_Rel *)data;
where = (Elf_Addr *) (relocbase + rel->r_offset);
addend = *where;
rtype = ELF_R_TYPE(rel->r_info);
break;
case ELF_RELOC_RELA:
- rela = (Elf_Rela *)data;
+ rela = (const Elf_Rela *)data;
where = (Elf_Addr *) (relocbase + rela->r_offset);
addend = rela->r_addend;
rtype = ELF_R_TYPE(rela->r_info);
diff --git a/sys/i386/i386/i386-gdbstub.c b/sys/i386/i386/i386-gdbstub.c
index 25e2838..d91ae61 100644
--- a/sys/i386/i386/i386-gdbstub.c
+++ b/sys/i386/i386/i386-gdbstub.c
@@ -271,7 +271,7 @@ putpacket (char *buffer)
checksum = 0;
count = 0;
- while (ch=buffer[count])
+ while ((ch=buffer[count]) != 0)
{
putDebugChar (ch);
checksum += ch;
diff --git a/sys/i386/i386/in_cksum.c b/sys/i386/i386/in_cksum.c
index 7250798..d388cc1 100644
--- a/sys/i386/i386/in_cksum.c
+++ b/sys/i386/i386/in_cksum.c
@@ -32,7 +32,7 @@
*
* from tahoe: in_cksum.c 1.2 86/01/05
* from: @(#)in_cksum.c 1.3 (Berkeley) 1/19/91
- * $Id: in_cksum.c,v 1.12 1997/09/02 20:05:27 bde Exp $
+ * $Id: in_cksum.c,v 1.13 1998/04/15 17:26:15 bde Exp $
*/
#include <sys/param.h>
@@ -277,8 +277,8 @@ in_cksum_partial(psum, w, len)
REDUCE;
if ((1 & (int) w) && (len > 0)) {
sum <<= 8;
- su.c[0] = *(char *)w;
- w = (u_short *)((char *)w + 1);
+ su.c[0] = *(const char *)w;
+ w = (u_short *)((const char *)w + 1);
len--;
byte_swapped = 1;
}
@@ -382,7 +382,7 @@ in_cksum_partial(psum, w, len)
sum <<= 8;
byte_swapped = 0;
if (len == -1) {
- su.c[1] = *(char *)w;
+ su.c[1] = *(const char *)w;
sum += su.s;
len = 0;
} else
@@ -393,7 +393,7 @@ in_cksum_partial(psum, w, len)
* There could be a word split betwen
* this buffer and the next.
*/
- su.c[0] = *(char *)w;
+ su.c[0] = *(const char *)w;
}
out:
if (len == -1) {
diff --git a/sys/i386/i386/math_emulate.c b/sys/i386/i386/math_emulate.c
index a7077bd..3eff8ac 100644
--- a/sys/i386/i386/math_emulate.c
+++ b/sys/i386/i386/math_emulate.c
@@ -6,7 +6,7 @@
* [expediant "port" of linux 8087 emulator to 386BSD, with apologies -wfj]
*
* from: 386BSD 0.1
- * $Id: math_emulate.c,v 1.31 1998/11/15 15:33:50 bde Exp $
+ * $Id: math_emulate.c,v 1.32 1999/01/17 20:30:13 peter Exp $
*/
/*
@@ -730,7 +730,7 @@ get_short_int(temp_real * tmp, struct trapframe * info, unsigned short code)
addr = ea(info,code);
ti.a = (signed short) get_fs_word((unsigned short *) addr);
ti.b = 0;
- if (ti.sign = (ti.a < 0))
+ if ((ti.sign = (ti.a < 0)) != 0)
ti.a = - ti.a;
int_to_real(&ti,tmp);
}
@@ -744,7 +744,7 @@ get_long_int(temp_real * tmp, struct trapframe * info, unsigned short code)
addr = ea(info,code);
ti.a = get_fs_long((u_int32_t *) addr);
ti.b = 0;
- if (ti.sign = (ti.a < 0))
+ if ((ti.sign = (ti.a < 0)) != 0)
ti.a = - ti.a;
int_to_real(&ti,tmp);
}
@@ -758,7 +758,7 @@ get_longlong_int(temp_real * tmp, struct trapframe * info, unsigned short code)
addr = ea(info,code);
ti.a = get_fs_long((u_int32_t *) addr);
ti.b = get_fs_long(1 + (u_int32_t *) addr);
- if (ti.sign = (ti.b < 0))
+ if ((ti.sign = (ti.b < 0)) != 0)
__asm__("notl %0 ; notl %1\n\t"
"addl $1,%0 ; adcl $0,%1"
:"=r" (ti.a),"=r" (ti.b)
diff --git a/sys/i386/i386/mp_machdep.c b/sys/i386/i386/mp_machdep.c
index 569f04b..bd188d3 100644
--- a/sys/i386/i386/mp_machdep.c
+++ b/sys/i386/i386/mp_machdep.c
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.87 1999/01/12 00:19:31 eivind Exp $
+ * $Id: mp_machdep.c,v 1.88 1999/01/20 04:24:22 jkh Exp $
*/
#include "opt_smp.h"
@@ -378,7 +378,7 @@ mp_probe(void)
POSTCODE(MP_PROBE_POST);
/* see if EBDA exists */
- if (segment = (u_long) * (u_short *) (KERNBASE + 0x40e)) {
+ if ((segment = (u_long) * (u_short *) (KERNBASE + 0x40e)) != 0) {
/* search first 1K of EBDA */
target = (u_int32_t) (segment << 4);
if ((x = search_for_sig(target, 1024 / 4)) >= 0)
diff --git a/sys/i386/i386/mptable.c b/sys/i386/i386/mptable.c
index 569f04b..bd188d3 100644
--- a/sys/i386/i386/mptable.c
+++ b/sys/i386/i386/mptable.c
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.87 1999/01/12 00:19:31 eivind Exp $
+ * $Id: mp_machdep.c,v 1.88 1999/01/20 04:24:22 jkh Exp $
*/
#include "opt_smp.h"
@@ -378,7 +378,7 @@ mp_probe(void)
POSTCODE(MP_PROBE_POST);
/* see if EBDA exists */
- if (segment = (u_long) * (u_short *) (KERNBASE + 0x40e)) {
+ if ((segment = (u_long) * (u_short *) (KERNBASE + 0x40e)) != 0) {
/* search first 1K of EBDA */
target = (u_int32_t) (segment << 4);
if ((x = search_for_sig(target, 1024 / 4)) >= 0)
diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c
index 12c60da..519326a 100644
--- a/sys/i386/i386/pmap.c
+++ b/sys/i386/i386/pmap.c
@@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
- * $Id: pmap.c,v 1.220 1999/01/21 08:29:03 dillon Exp $
+ * $Id: pmap.c,v 1.221 1999/01/24 06:04:51 dillon Exp $
*/
/*
@@ -771,7 +771,7 @@ pmap_pte_quick(pmap, va)
vm_offset_t va;
{
unsigned pde, newpf;
- if (pde = (unsigned) pmap->pm_pdir[va >> PDRSHIFT]) {
+ if ((pde = (unsigned) pmap->pm_pdir[va >> PDRSHIFT]) != 0) {
unsigned frame = (unsigned) pmap->pm_pdir[PTDPTDI] & PG_FRAME;
unsigned index = i386_btop(va);
/* are we current address space or kernel? */
@@ -3371,7 +3371,7 @@ pmap_mincore(pmap, addr)
return 0;
}
- if (pte = *ptep) {
+ if ((pte = *ptep) != 0) {
pv_table_t *ppv;
vm_offset_t pa;
diff --git a/sys/i386/i386/sys_machdep.c b/sys/i386/i386/sys_machdep.c
index 63804ab..17aa580 100644
--- a/sys/i386/i386/sys_machdep.c
+++ b/sys/i386/i386/sys_machdep.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)sys_machdep.c 5.5 (Berkeley) 1/19/91
- * $Id: sys_machdep.c,v 1.37 1998/08/24 02:28:15 bde Exp $
+ * $Id: sys_machdep.c,v 1.38 1998/12/07 21:58:19 archie Exp $
*
*/
@@ -182,10 +182,10 @@ i386_set_ioperm(p, args)
struct i386_ioperm_args ua;
char *iomap;
- if (error = copyin(args, &ua, sizeof(struct i386_ioperm_args)))
+ if ((error = copyin(args, &ua, sizeof(struct i386_ioperm_args))) != 0)
return (error);
- if (error = suser(p->p_ucred, &p->p_acflag))
+ if ((error = suser(p->p_ucred, &p->p_acflag)) != 0)
return (error);
if (securelevel > 0)
return (EPERM);
@@ -197,7 +197,7 @@ i386_set_ioperm(p, args)
*/
if (p->p_addr->u_pcb.pcb_ext == 0)
- if (error = i386_extend_pcb(p))
+ if ((error = i386_extend_pcb(p)) != 0)
return (error);
iomap = (char *)p->p_addr->u_pcb.pcb_ext->ext_iomap;
@@ -222,7 +222,7 @@ i386_get_ioperm(p, args)
struct i386_ioperm_args ua;
char *iomap;
- if (error = copyin(args, &ua, sizeof(struct i386_ioperm_args)))
+ if ((error = copyin(args, &ua, sizeof(struct i386_ioperm_args))) != 0)
return (error);
if (ua.start >= IOPAGES * PAGE_SIZE * NBBY)
return (EINVAL);
diff --git a/sys/i386/i386/userconfig.c b/sys/i386/i386/userconfig.c
index c505d71..6934e38 100644
--- a/sys/i386/i386/userconfig.c
+++ b/sys/i386/i386/userconfig.c
@@ -46,7 +46,7 @@
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
- ** $Id: userconfig.c,v 1.125 1999/01/14 23:43:22 bde Exp $
+ ** $Id: userconfig.c,v 1.126 1999/01/17 17:42:22 wpaul Exp $
**/
/**
@@ -2516,7 +2516,7 @@ visuserconfig(void)
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: userconfig.c,v 1.125 1999/01/14 23:43:22 bde Exp $
+ * $Id: userconfig.c,v 1.126 1999/01/17 17:42:22 wpaul Exp $
*/
#include "scbus.h"
@@ -2531,7 +2531,10 @@ typedef struct _cmdparm {
union {
struct isa_device *dparm;
int iparm;
- void *aparm;
+ union {
+ void *aparm;
+ const char *sparm;
+ } u;
} parm;
} CmdParm;
@@ -2554,8 +2557,8 @@ static struct isa_device *find_device(char *, int);
static struct isa_device *search_devtable(struct isa_device *, char *, int);
static void cngets(char *, int);
static Cmd *parse_cmd(char *);
-static int parse_args(char *, CmdParm *);
-static unsigned long strtoul(const char *, char **, int);
+static int parse_args(const char *, CmdParm *);
+static unsigned long strtoul(const char *, const char **, int);
static int save_dev(struct isa_device *);
static int list_devices(CmdParm *);
@@ -2698,10 +2701,10 @@ parse_cmd(char *cmd)
}
static int
-parse_args(char *cmd, CmdParm *parms)
+parse_args(const char *cmd, CmdParm *parms)
{
while (1) {
- char *ptr;
+ const char *ptr;
if (*cmd == ' ' || *cmd == '\t') {
++cmd;
@@ -2750,7 +2753,7 @@ parse_args(char *cmd, CmdParm *parms)
continue;
}
if (parms->type == PARM_ADDR) {
- parms->parm.aparm = (void *)(uintptr_t)strtoul(cmd, &ptr, 0);
+ parms->parm.u.aparm = (void *)(uintptr_t)strtoul(cmd, &ptr, 0);
if (cmd == ptr) {
printf("Invalid address argument\n");
return 1;
@@ -2760,7 +2763,7 @@ parse_args(char *cmd, CmdParm *parms)
continue;
}
if (parms->type == PARM_STRING) {
- parms->parm.aparm = (void *)cmd ;
+ parms->parm.u.sparm = cmd;
return 0;
}
}
@@ -2838,7 +2841,7 @@ set_device_iosize(CmdParm *parms)
static int
set_device_mem(CmdParm *parms)
{
- parms[0].parm.dparm->id_maddr = parms[1].parm.aparm;
+ parms[0].parm.dparm->id_maddr = parms[1].parm.u.aparm;
save_dev(parms[0].parm.dparm);
return 0;
}
@@ -2877,7 +2880,8 @@ set_pnp_parms(CmdParm *parms)
{
u_long idx, val, ldn, csn;
int i;
- char *q, *p=parms[0].parm.aparm;
+ const char *q;
+ const char *p = parms[0].parm.u.sparm;
struct pnp_cinfo d;
csn=strtoul(p,&q, 0);
@@ -3353,7 +3357,7 @@ static int errno;
static unsigned long
strtoul(nptr, endptr, base)
const char *nptr;
- char **endptr;
+ const char **endptr;
register int base;
{
register const char *s = nptr;
@@ -3392,7 +3396,7 @@ strtoul(nptr, endptr, base)
break;
if (c >= base)
break;
- if (any < 0 || acc > cutoff || acc == cutoff && c > cutlim)
+ if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
any = -1;
else {
any = 1;
@@ -3406,7 +3410,7 @@ strtoul(nptr, endptr, base)
} else if (neg)
acc = -acc;
if (endptr != 0)
- *endptr = (char *)(any ? s - 1 : nptr);
+ *endptr = (const char *)(any ? s - 1 : nptr);
return (acc);
}
diff --git a/sys/i386/i386/vm86.c b/sys/i386/i386/vm86.c
index 3a536e2..6e5e97f 100644
--- a/sys/i386/i386/vm86.c
+++ b/sys/i386/i386/vm86.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: vm86.c,v 1.18 1998/09/29 22:06:33 ache Exp $
+ * $Id: vm86.c,v 1.19 1998/12/07 21:58:19 archie Exp $
*/
#include "opt_vm86.h"
@@ -675,11 +675,11 @@ vm86_sysarch(p, args)
struct i386_vm86_args ua;
struct vm86_kernel *vm86;
- if (error = copyin(args, &ua, sizeof(struct i386_vm86_args)))
+ if ((error = copyin(args, &ua, sizeof(struct i386_vm86_args))) != 0)
return (error);
if (p->p_addr->u_pcb.pcb_ext == 0)
- if (error = i386_extend_pcb(p))
+ if ((error = i386_extend_pcb(p)) != 0)
return (error);
vm86 = &p->p_addr->u_pcb.pcb_ext->ext_vm86;
@@ -687,7 +687,7 @@ vm86_sysarch(p, args)
case VM86_INIT: {
struct vm86_init_args sa;
- if (error = copyin(ua.sub_args, &sa, sizeof(sa)))
+ if ((error = copyin(ua.sub_args, &sa, sizeof(sa))) != 0)
return (error);
if (cpu_feature & CPUID_VME)
vm86->vm86_has_vme = (rcr4() & CR4_VME ? 1 : 0);
diff --git a/sys/i386/ibcs2/ibcs2_ioctl.c b/sys/i386/ibcs2/ibcs2_ioctl.c
index e285071..e0f3824 100644
--- a/sys/i386/ibcs2/ibcs2_ioctl.c
+++ b/sys/i386/ibcs2/ibcs2_ioctl.c
@@ -508,7 +508,7 @@ ibcs2_ioctl(p, uap)
SCARG(&sa, pid) = 0;
SCARG(&sa, pgid) = (int)SCARG(uap, data);
- if (error = setpgid(p, &sa))
+ if ((error = setpgid(p, &sa)) != 0)
return error;
return 0;
}
diff --git a/sys/i386/ibcs2/ibcs2_misc.c b/sys/i386/ibcs2/ibcs2_misc.c
index c2b1a55..6cbb575 100644
--- a/sys/i386/ibcs2/ibcs2_misc.c
+++ b/sys/i386/ibcs2/ibcs2_misc.c
@@ -45,7 +45,7 @@
*
* @(#)sun_misc.c 8.1 (Berkeley) 6/18/93
*
- * $Id: ibcs2_misc.c,v 1.29 1998/08/17 18:12:52 bde Exp $
+ * $Id: ibcs2_misc.c,v 1.30 1998/09/26 00:55:53 des Exp $
*/
/*
@@ -346,7 +346,7 @@ again:
* First we read into the malloc'ed buffer, then
* we massage it into user space, one record at a time.
*/
- if (error = VOP_READDIR(vp, &auio, fp->f_cred, &eofflag, &ncookies, &cookies))
+ if ((error = VOP_READDIR(vp, &auio, fp->f_cred, &eofflag, &ncookies, &cookies)) != 0)
goto out;
inp = buf;
outp = SCARG(uap, buf);
@@ -454,7 +454,7 @@ ibcs2_read(p, uap)
u_long *cookies = NULL, *cookiep;
int ncookies;
- if (error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) {
+ if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) != 0) {
if (error == EINVAL)
return read(p, (struct read_args *)uap);
else
@@ -493,7 +493,7 @@ again:
* First we read into the malloc'ed buffer, then
* we massage it into user space, one record at a time.
*/
- if (error = VOP_READDIR(vp, &auio, fp->f_cred, &eofflag, &ncookies, &cookies)) {
+ if ((error = VOP_READDIR(vp, &auio, fp->f_cred, &eofflag, &ncookies, &cookies)) != 0) {
DPRINTF(("VOP_READDIR failed: %d\n", error));
goto out;
}
@@ -556,7 +556,7 @@ again:
BSD_DIRENT(inp)->d_fileno;
(void)copystr(BSD_DIRENT(inp)->d_name, idb.name, 14, &size);
bzero(idb.name + size, 14 - size);
- if (error = copyout(&idb, outp, sizeof(struct ibcs2_direct)))
+ if ((error = copyout(&idb, outp, sizeof(struct ibcs2_direct))) != 0)
goto out;
/* advance past this real entry */
if (cookiep) {
@@ -623,7 +623,7 @@ ibcs2_getgroups(p, uap)
iset = stackgap_alloc(&sg, SCARG(uap, gidsetsize) *
sizeof(ibcs2_gid_t));
}
- if (error = getgroups(p, &sa))
+ if ((error = getgroups(p, &sa)) != 0)
return error;
if (SCARG(uap, gidsetsize) == 0)
return 0;
@@ -654,9 +654,9 @@ ibcs2_setgroups(p, uap)
iset = stackgap_alloc(&sg, SCARG(&sa, gidsetsize) *
sizeof(ibcs2_gid_t *));
if (SCARG(&sa, gidsetsize)) {
- if (error = copyin((caddr_t)SCARG(uap, gidset), (caddr_t)iset,
+ if ((error = copyin((caddr_t)SCARG(uap, gidset), (caddr_t)iset,
sizeof(ibcs2_gid_t *) *
- SCARG(uap, gidsetsize)))
+ SCARG(uap, gidsetsize))) != 0)
return error;
}
for (i = 0, gp = SCARG(&sa, gidset); i < SCARG(&sa, gidsetsize); i++)
@@ -740,7 +740,7 @@ ibcs2_sysconf(p, uap)
SCARG(&ga, which) = RLIMIT_NPROC;
SCARG(&ga, rlp) = stackgap_alloc(&sg, sizeof(struct rlimit *));
- if (error = getrlimit(p, &ga))
+ if ((error = getrlimit(p, &ga)) != 0)
return error;
p->p_retval[0] = SCARG(&ga, rlp)->rlim_cur;
return 0;
@@ -760,7 +760,7 @@ ibcs2_sysconf(p, uap)
SCARG(&ga, which) = RLIMIT_NOFILE;
SCARG(&ga, rlp) = stackgap_alloc(&sg, sizeof(struct rlimit *));
- if (error = getrlimit(p, &ga))
+ if ((error = getrlimit(p, &ga)) != 0)
return error;
p->p_retval[0] = SCARG(&ga, rlp)->rlim_cur;
return 0;
@@ -798,7 +798,7 @@ ibcs2_sysconf(p, uap)
SCARG(&sa, oldlenp) = &len;
SCARG(&sa, new) = NULL;
SCARG(&sa, newlen) = 0;
- if (error = __sysctl(p, &sa))
+ if ((error = __sysctl(p, &sa)) != 0)
return error;
p->p_retval[0] = value;
return 0;
@@ -878,11 +878,11 @@ ibcs2_stime(p, uap)
SCARG(&sa, tv) = stackgap_alloc(&sg, sizeof(*SCARG(&sa, tv)));
SCARG(&sa, tzp) = NULL;
- if (error = copyin((caddr_t)SCARG(uap, timep),
- &(SCARG(&sa, tv)->tv_sec), sizeof(long)))
+ if ((error = copyin((caddr_t)SCARG(uap, timep),
+ &(SCARG(&sa, tv)->tv_sec), sizeof(long))) != 0)
return error;
SCARG(&sa, tv)->tv_usec = 0;
- if (error = settimeofday(p, &sa))
+ if ((error = settimeofday(p, &sa)) != 0)
return EPERM;
return 0;
}
@@ -902,8 +902,8 @@ ibcs2_utime(p, uap)
if (SCARG(uap, buf)) {
struct ibcs2_utimbuf ubuf;
- if (error = copyin((caddr_t)SCARG(uap, buf), (caddr_t)&ubuf,
- sizeof(ubuf)))
+ if ((error = copyin((caddr_t)SCARG(uap, buf), (caddr_t)&ubuf,
+ sizeof(ubuf))) != 0)
return error;
SCARG(&sa, tptr) = stackgap_alloc(&sg,
2 * sizeof(struct timeval *));
@@ -929,7 +929,7 @@ ibcs2_nice(p, uap)
SCARG(&sa, which) = PRIO_PROCESS;
SCARG(&sa, who) = 0;
SCARG(&sa, prio) = p->p_nice + SCARG(uap, incr);
- if (error = setpriority(p, &sa))
+ if ((error = setpriority(p, &sa)) != 0)
return EPERM;
p->p_retval[0] = p->p_nice;
return 0;
@@ -993,7 +993,7 @@ ibcs2_plock(p, uap)
#define IBCS2_DATALOCK 4
- if (error = suser(p->p_ucred, &p->p_acflag))
+ if ((error = suser(p->p_ucred, &p->p_acflag)) != 0)
return EPERM;
switch(SCARG(uap, cmd)) {
case IBCS2_UNLOCK:
diff --git a/sys/i386/ibcs2/ibcs2_msg.c b/sys/i386/ibcs2/ibcs2_msg.c
index ba2af2d..8b7429b 100644
--- a/sys/i386/ibcs2/ibcs2_msg.c
+++ b/sys/i386/ibcs2/ibcs2_msg.c
@@ -21,7 +21,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: ibcs2_msg.c,v 1.4 1997/07/20 09:39:44 bde Exp $
+ * $Id: ibcs2_msg.c,v 1.5 1997/11/06 19:28:34 phk Exp $
*/
/*
@@ -93,8 +93,8 @@ ibcs2_poll(p, uap)
tmp_select.tv = timeout;
for (i = 0; i < uap->nfds; i++) {
- if (error = copyin(uap->fds + i*sizeof(struct ibcs2_poll),
- &conv, sizeof(conv)))
+ if ((error = copyin(uap->fds + i*sizeof(struct ibcs2_poll),
+ &conv, sizeof(conv))) != 0)
return error;
conv.revents = 0;
if (conv.fd < 0 || conv.fd > FD_SETSIZE)
@@ -107,7 +107,7 @@ ibcs2_poll(p, uap)
FD_SET(conv.fd, writefds);
FD_SET(conv.fd, exceptfds);
}
- if (error = select(p, &tmp_select))
+ if ((error = select(p, &tmp_select)) != 0)
return error;
if (p->p_retval[0] == 0)
return 0;
@@ -129,9 +129,9 @@ ibcs2_poll(p, uap)
if (conv.revents)
++p->p_retval[0];
}
- if (error = copyout(&conv,
+ if ((error = copyout(&conv,
uap->fds + i*sizeof(struct ibcs2_poll),
- sizeof(conv)))
+ sizeof(conv))) != 0)
return error;
}
return 0;
diff --git a/sys/i386/ibcs2/ibcs2_socksys.c b/sys/i386/ibcs2/ibcs2_socksys.c
index c7f109a..0f5ee4d 100644
--- a/sys/i386/ibcs2/ibcs2_socksys.c
+++ b/sys/i386/ibcs2/ibcs2_socksys.c
@@ -68,7 +68,7 @@ ibcs2_socksys(p, uap)
* The others are (and should be) only legal on sockets.
*/
- if (error = copyin(uap->argsp, (caddr_t)realargs, sizeof(realargs)))
+ if ((error = copyin(uap->argsp, (caddr_t)realargs, sizeof(realargs))) != 0)
return error;
DPRINTF(("ibcs2_socksys: %08x %08x %08x %08x %08x %08x %08x\n",
realargs[0], realargs[1], realargs[2], realargs[3],
diff --git a/sys/i386/ibcs2/ibcs2_stat.c b/sys/i386/ibcs2/ibcs2_stat.c
index d3bf6ae..36990c3 100644
--- a/sys/i386/ibcs2/ibcs2_stat.c
+++ b/sys/i386/ibcs2/ibcs2_stat.c
@@ -104,12 +104,12 @@ ibcs2_statfs(p, uap)
CHECKALTEXIST(p, &sg, SCARG(uap, path));
NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, SCARG(uap, path), p);
- if (error = namei(&nd))
+ if ((error = namei(&nd)) != 0)
return (error);
mp = nd.ni_vp->v_mount;
sp = &mp->mnt_stat;
vrele(nd.ni_vp);
- if (error = VFS_STATFS(mp, sp, p))
+ if ((error = VFS_STATFS(mp, sp, p)) != 0)
return (error);
sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK;
return cvt_statfs(sp, (caddr_t)SCARG(uap, buf), SCARG(uap, len));
@@ -125,11 +125,11 @@ ibcs2_fstatfs(p, uap)
register struct statfs *sp;
int error;
- if (error = getvnode(p->p_fd, SCARG(uap, fd), &fp))
+ if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) != 0)
return (error);
mp = ((struct vnode *)fp->f_data)->v_mount;
sp = &mp->mnt_stat;
- if (error = VFS_STATFS(mp, sp, p))
+ if ((error = VFS_STATFS(mp, sp, p)) != 0)
return (error);
sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK;
return cvt_statfs(sp, (caddr_t)SCARG(uap, buf), SCARG(uap, len));
@@ -150,10 +150,10 @@ ibcs2_stat(p, uap)
SCARG(&cup, path) = SCARG(uap, path);
SCARG(&cup, ub) = stackgap_alloc(&sg, sizeof(st));
- if (error = stat(p, &cup))
+ if ((error = stat(p, &cup)) != 0)
return error;
- if (error = copyin(SCARG(&cup, ub), &st, sizeof(st)))
+ if ((error = copyin(SCARG(&cup, ub), &st, sizeof(st))) != 0)
return error;
bsd_stat2ibcs_stat(&st, &ibcs2_st);
return copyout((caddr_t)&ibcs2_st, (caddr_t)SCARG(uap, st),
@@ -175,10 +175,10 @@ ibcs2_lstat(p, uap)
SCARG(&cup, path) = SCARG(uap, path);
SCARG(&cup, ub) = stackgap_alloc(&sg, sizeof(st));
- if (error = lstat(p, &cup))
+ if ((error = lstat(p, &cup)) != 0)
return error;
- if (error = copyin(SCARG(&cup, ub), &st, sizeof(st)))
+ if ((error = copyin(SCARG(&cup, ub), &st, sizeof(st))) != 0)
return error;
bsd_stat2ibcs_stat(&st, &ibcs2_st);
return copyout((caddr_t)&ibcs2_st, (caddr_t)SCARG(uap, st),
@@ -199,10 +199,10 @@ ibcs2_fstat(p, uap)
SCARG(&cup, fd) = SCARG(uap, fd);
SCARG(&cup, sb) = stackgap_alloc(&sg, sizeof(st));
- if (error = fstat(p, &cup))
+ if ((error = fstat(p, &cup)) != 0)
return error;
- if (error = copyin(SCARG(&cup, sb), &st, sizeof(st)))
+ if ((error = copyin(SCARG(&cup, sb), &st, sizeof(st))) != 0)
return error;
bsd_stat2ibcs_stat(&st, &ibcs2_st);
return copyout((caddr_t)&ibcs2_st, (caddr_t)SCARG(uap, st),
diff --git a/sys/i386/ibcs2/ibcs2_sysi86.c b/sys/i386/ibcs2/ibcs2_sysi86.c
index ba9c12f..210c268 100644
--- a/sys/i386/ibcs2/ibcs2_sysi86.c
+++ b/sys/i386/ibcs2/ibcs2_sysi86.c
@@ -60,7 +60,7 @@ ibcs2_sysi86(struct proc *p, struct ibcs2_sysi86_args *args)
if (hw_float) val = IBCS2_FP_387; /* FPU hardware */
else val = IBCS2_FP_SW; /* FPU emulator */
- if (error = copyout(&val, SCARG(args, arg), sizeof(val)))
+ if ((error = copyout(&val, SCARG(args, arg), sizeof(val))) != 0)
return error;
return 0;
}
diff --git a/sys/i386/ibcs2/ibcs2_xenix.c b/sys/i386/ibcs2/ibcs2_xenix.c
index 8ab5556..89506bf 100644
--- a/sys/i386/ibcs2/ibcs2_xenix.c
+++ b/sys/i386/ibcs2/ibcs2_xenix.c
@@ -27,7 +27,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: ibcs2_xenix.c,v 1.16 1998/08/16 01:21:49 bde Exp $
+ * $Id: ibcs2_xenix.c,v 1.17 1998/12/04 22:54:46 archie Exp $
*/
#include <sys/param.h>
@@ -80,7 +80,7 @@ xenix_rdchk(p, uap)
SCARG(&sa, fd) = SCARG(uap, fd);
SCARG(&sa, com) = FIONREAD;
SCARG(&sa, data) = stackgap_alloc(&sg, sizeof(int));
- if (error = ioctl(p, &sa))
+ if ((error = ioctl(p, &sa)) != 0)
return error;
p->p_retval[0] = (*((int*)SCARG(&sa, data))) ? 1 : 0;
return 0;
@@ -202,7 +202,7 @@ xenix_eaccess(struct proc *p, struct xenix_eaccess_args *uap)
NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE,
SCARG(uap, path), p);
- if (error = namei(&nd))
+ if ((error = namei(&nd)) != 0)
return error;
vp = nd.ni_vp;
diff --git a/sys/i386/ibcs2/imgact_coff.c b/sys/i386/ibcs2/imgact_coff.c
index 3632b74..da41412 100644
--- a/sys/i386/ibcs2/imgact_coff.c
+++ b/sys/i386/ibcs2/imgact_coff.c
@@ -26,7 +26,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: imgact_coff.c,v 1.33 1998/10/16 03:55:00 peter Exp $
+ * $Id: imgact_coff.c,v 1.34 1999/01/17 20:39:08 peter Exp $
*/
#include <sys/param.h>
@@ -92,14 +92,14 @@ load_coff_section(struct vmspace *vmspace, struct vnode *vp, vm_offset_t offset,
"VM_PROT_ALL, MAP_PRIVATE | MAP_FIXED, vp, 0x%x)\n",
__FILE__, __LINE__, map_addr, map_len, prot, map_offset));
- if (error = vm_mmap(&vmspace->vm_map,
+ if ((error = vm_mmap(&vmspace->vm_map,
&map_addr,
map_len,
prot,
VM_PROT_ALL,
MAP_PRIVATE | MAP_FIXED,
(caddr_t) vp,
- map_offset))
+ map_offset)) != 0)
return error;
if (memsz == filsz) {
@@ -128,14 +128,14 @@ load_coff_section(struct vmspace *vmspace, struct vnode *vp, vm_offset_t offset,
return error;
}
- if (error = vm_mmap(kernel_map,
+ if ((error = vm_mmap(kernel_map,
(vm_offset_t *) &data_buf,
PAGE_SIZE,
VM_PROT_READ,
VM_PROT_READ,
0,
(caddr_t) vp,
- trunc_page(offset + filsz)))
+ trunc_page(offset + filsz))) != 0)
return error;
error = copyout(data_buf, (caddr_t) map_addr, copy_len);
@@ -182,7 +182,7 @@ coff_load_file(struct proc *p, char *name)
goto fail;
}
- if (error = VOP_GETATTR(vp, &attr, p->p_ucred, p))
+ if ((error = VOP_GETATTR(vp, &attr, p->p_ucred, p)) != 0)
goto fail;
if ((vp->v_mount->mnt_flag & MNT_NOEXEC)
@@ -195,10 +195,10 @@ coff_load_file(struct proc *p, char *name)
goto fail;
}
- if (error = VOP_ACCESS(vp, VEXEC, p->p_ucred, p))
+ if ((error = VOP_ACCESS(vp, VEXEC, p->p_ucred, p)) != 0)
goto fail;
- if (error = VOP_OPEN(vp, FREAD, p->p_ucred, p))
+ if ((error = VOP_OPEN(vp, FREAD, p->p_ucred, p)) != 0)
goto fail;
/*
@@ -207,14 +207,14 @@ coff_load_file(struct proc *p, char *name)
*/
VOP_UNLOCK(vp, 0, p);
- if (error = vm_mmap(kernel_map,
+ if ((error = vm_mmap(kernel_map,
(vm_offset_t *) &ptr,
PAGE_SIZE,
VM_PROT_READ,
VM_PROT_READ,
0,
(caddr_t) vp,
- 0))
+ 0)) != 0)
goto fail;
fhdr = (struct filehdr *)ptr;
@@ -256,16 +256,16 @@ coff_load_file(struct proc *p, char *name)
}
}
- if (error = load_coff_section(vmspace, vp, text_offset,
+ if ((error = load_coff_section(vmspace, vp, text_offset,
(caddr_t)(void *)(uintptr_t)text_address,
text_size, text_size,
- VM_PROT_READ | VM_PROT_EXECUTE)) {
+ VM_PROT_READ | VM_PROT_EXECUTE)) != 0) {
goto dealloc_and_fail;
}
- if (error = load_coff_section(vmspace, vp, data_offset,
+ if ((error = load_coff_section(vmspace, vp, data_offset,
(caddr_t)(void *)(uintptr_t)data_address,
data_size + bss_size, data_size,
- VM_PROT_ALL)) {
+ VM_PROT_ALL)) != 0) {
goto dealloc_and_fail;
}
@@ -325,7 +325,7 @@ exec_coff_imgact(imgp)
((const char*)(imgp->image_header) + sizeof(struct filehdr) +
sizeof(struct aouthdr));
- if (error = exec_extract_strings(imgp)) {
+ if ((error = exec_extract_strings(imgp)) != 0) {
DPRINTF(("%s(%d): return %d\n", __FILE__, __LINE__, error));
return error;
}
@@ -364,14 +364,14 @@ exec_coff_imgact(imgp)
int len = round_page(scns[i].s_size + PAGE_SIZE);
int j;
- if (error = vm_mmap(kernel_map,
+ if ((error = vm_mmap(kernel_map,
(vm_offset_t *) &buf,
len,
VM_PROT_READ,
VM_PROT_READ,
0,
(caddr_t) imgp->vp,
- foff)) {
+ foff)) != 0) {
return ENOEXEC;
}
if(scns[i].s_size) {
@@ -416,11 +416,11 @@ exec_coff_imgact(imgp)
"imgp->vp, %08lx, %08lx, 0x%x, 0x%x, 0x%x)\n",
__FILE__, __LINE__, text_offset, text_address,
text_size, text_size, VM_PROT_READ | VM_PROT_EXECUTE));
- if (error = load_coff_section(vmspace, imgp->vp,
+ if ((error = load_coff_section(vmspace, imgp->vp,
text_offset,
(caddr_t)(void *)(uintptr_t)text_address,
text_size, text_size,
- VM_PROT_READ | VM_PROT_EXECUTE)) {
+ VM_PROT_READ | VM_PROT_EXECUTE)) != 0) {
DPRINTF(("%s(%d): error = %d\n", __FILE__, __LINE__, error));
return error;
}
@@ -433,11 +433,11 @@ exec_coff_imgact(imgp)
"imgp->vp, 0x%08lx, 0x%08lx, 0x%x, 0x%x, 0x%x)\n",
__FILE__, __LINE__, data_offset, data_address,
data_size + bss_size, data_size, VM_PROT_ALL));
- if (error = load_coff_section(vmspace, imgp->vp,
+ if ((error = load_coff_section(vmspace, imgp->vp,
data_offset,
(caddr_t)(void *)(uintptr_t)data_address,
data_size + bss_size, data_size,
- VM_PROT_ALL)) {
+ VM_PROT_ALL)) != 0) {
DPRINTF(("%s(%d): error = %d\n", __FILE__, __LINE__, error));
return error;
diff --git a/sys/i386/include/mptable.h b/sys/i386/include/mptable.h
index 569f04b..bd188d3 100644
--- a/sys/i386/include/mptable.h
+++ b/sys/i386/include/mptable.h
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.87 1999/01/12 00:19:31 eivind Exp $
+ * $Id: mp_machdep.c,v 1.88 1999/01/20 04:24:22 jkh Exp $
*/
#include "opt_smp.h"
@@ -378,7 +378,7 @@ mp_probe(void)
POSTCODE(MP_PROBE_POST);
/* see if EBDA exists */
- if (segment = (u_long) * (u_short *) (KERNBASE + 0x40e)) {
+ if ((segment = (u_long) * (u_short *) (KERNBASE + 0x40e)) != 0) {
/* search first 1K of EBDA */
target = (u_int32_t) (segment << 4);
if ((x = search_for_sig(target, 1024 / 4)) >= 0)
diff --git a/sys/i386/isa/asc.c b/sys/i386/isa/asc.c
index 595a33c..754d79e 100644
--- a/sys/i386/isa/asc.c
+++ b/sys/i386/isa/asc.c
@@ -34,7 +34,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
- * $Id: asc.c,v 1.32 1998/10/22 05:58:38 bde Exp $
+ * $Id: asc.c,v 1.33 1999/01/27 10:10:00 bde Exp $
*/
#include "asc.h"
@@ -509,7 +509,7 @@ ascintr(int unit)
scu->icnt++;
/* ignore stray interrupts... */
- if ( scu->flags & (OPEN |READING) != (OPEN | READING) ) {
+ if ((scu->flags & (OPEN |READING)) != (OPEN | READING) ) {
/* must be after closing... */
scu->flags &= ~(OPEN | READING | DMA_ACTIVE | SLEEPING | SEL_COLL);
return;
diff --git a/sys/i386/isa/cy.c b/sys/i386/isa/cy.c
index 794d4d6..e95d7e6 100644
--- a/sys/i386/isa/cy.c
+++ b/sys/i386/isa/cy.c
@@ -27,7 +27,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: cy.c,v 1.82 1998/12/24 14:17:57 bde Exp $
+ * $Id: cy.c,v 1.83 1999/01/08 19:17:46 bde Exp $
*/
#include "opt_compat.h"
@@ -924,7 +924,7 @@ comhardclose(com)
enable_intr();
#endif
tp = com->tp;
- if (tp->t_cflag & HUPCL
+ if ((tp->t_cflag & HUPCL)
/*
* XXX we will miss any carrier drop between here and the
* next open. Perhaps we should watch DCD even when the
@@ -932,9 +932,9 @@ comhardclose(com)
* the next open because it might go up and down while
* we're not watching.
*/
- || !com->active_out
+ || (!com->active_out
&& !(com->prev_modem_status & MSR_DCD)
- && !(com->it_in.c_cflag & CLOCAL)
+ && !(com->it_in.c_cflag & CLOCAL))
|| !(tp->t_state & TS_ISOPEN)) {
(void)commctl(com, TIOCM_DTR, DMBIC);
@@ -1107,16 +1107,16 @@ siointr(unit)
*/
if ( com->tp == NULL
|| !(com->tp->t_state & TS_ISOPEN)
- || (line_status & (LSR_PE|LSR_FE))
- && (com->tp->t_iflag & IGNPAR)
- || (line_status & LSR_BI)
- && (com->tp->t_iflag & IGNBRK))
+ || ((line_status & (LSR_PE|LSR_FE))
+ && (com->tp->t_iflag & IGNPAR))
+ || ((line_status & LSR_BI)
+ && (com->tp->t_iflag & IGNBRK)))
goto cont;
if ( (line_status & (LSR_PE|LSR_FE))
&& (com->tp->t_state & TS_CAN_BYPASS_L_RINT)
&& ((line_status & LSR_FE)
- || (line_status & LSR_PE)
- && (com->tp->t_iflag & INPCK)))
+ || ((line_status & LSR_PE)
+ && (com->tp->t_iflag & INPCK))))
recv_data = 0;
}
#endif /* 1 */
@@ -1357,8 +1357,8 @@ cont:
*/
cd_outb(iobase, CD1400_SRER, cy_align,
com->intr_enable
- = com->intr_enable
- & ~CD1400_SRER_TXRDY
+ = (com->intr_enable
+ & ~CD1400_SRER_TXRDY)
| CD1400_SRER_TXMPTY);
goto terminate_tx_service;
}
@@ -1472,8 +1472,8 @@ cont:
cd_outb(iobase, CD1400_SRER, cy_align,
com->intr_enable
- = com->intr_enable
- & ~CD1400_SRER_TXRDY
+ = (com->intr_enable
+ & ~CD1400_SRER_TXRDY)
| CD1400_SRER_TXMPTY);
}
if (!(com->state & CS_ODONE)) {
@@ -2190,13 +2190,13 @@ comparam(tp, t)
if (!(com->intr_enable & CD1400_SRER_TXRDY))
cd_setreg(com, CD1400_SRER,
com->intr_enable
- = com->intr_enable & ~CD1400_SRER_TXMPTY
+ = (com->intr_enable & ~CD1400_SRER_TXMPTY)
| CD1400_SRER_TXRDY);
} else {
if (com->intr_enable & CD1400_SRER_TXRDY)
cd_setreg(com, CD1400_SRER,
com->intr_enable
- = com->intr_enable & ~CD1400_SRER_TXRDY
+ = (com->intr_enable & ~CD1400_SRER_TXRDY)
| CD1400_SRER_TXMPTY);
}
@@ -2232,7 +2232,7 @@ comstart(tp)
if (com->intr_enable & CD1400_SRER_TXRDY)
cd_setreg(com, CD1400_SRER,
com->intr_enable
- = com->intr_enable & ~CD1400_SRER_TXRDY
+ = (com->intr_enable & ~CD1400_SRER_TXRDY)
| CD1400_SRER_TXMPTY);
} else {
com->state |= CS_TTGO;
@@ -2240,7 +2240,7 @@ comstart(tp)
&& !(com->intr_enable & CD1400_SRER_TXRDY))
cd_setreg(com, CD1400_SRER,
com->intr_enable
- = com->intr_enable & ~CD1400_SRER_TXMPTY
+ = (com->intr_enable & ~CD1400_SRER_TXMPTY)
| CD1400_SRER_TXRDY);
}
if (tp->t_state & TS_TBLOCK) {
@@ -2296,8 +2296,8 @@ comstart(tp)
| CS_ODEVREADY))
cd_setreg(com, CD1400_SRER,
com->intr_enable
- = com->intr_enable
- & ~CD1400_SRER_TXMPTY
+ = (com->intr_enable
+ & ~CD1400_SRER_TXMPTY)
| CD1400_SRER_TXRDY);
}
enable_intr();
@@ -2326,8 +2326,8 @@ comstart(tp)
| CS_ODEVREADY))
cd_setreg(com, CD1400_SRER,
com->intr_enable
- = com->intr_enable
- & ~CD1400_SRER_TXMPTY
+ = (com->intr_enable
+ & ~CD1400_SRER_TXMPTY)
| CD1400_SRER_TXRDY);
}
enable_intr();
@@ -2724,19 +2724,19 @@ cd_etc(com, etc)
enable_intr();
goto wait;
}
- if (etc == CD1400_ETC_SENDBREAK
+ if ((etc == CD1400_ETC_SENDBREAK
&& (com->etc == ETC_BREAK_STARTING
- || com->etc == ETC_BREAK_STARTED)
- || etc == CD1400_ETC_STOPBREAK
+ || com->etc == ETC_BREAK_STARTED))
+ || (etc == CD1400_ETC_STOPBREAK
&& (com->etc == ETC_BREAK_ENDING || com->etc == ETC_BREAK_ENDED
- || com->etc == ETC_NONE)) {
+ || com->etc == ETC_NONE))) {
enable_intr();
return;
}
com->etc = etc;
cd_setreg(com, CD1400_SRER,
com->intr_enable
- = com->intr_enable & ~CD1400_SRER_TXRDY | CD1400_SRER_TXMPTY);
+ = (com->intr_enable & ~CD1400_SRER_TXRDY) | CD1400_SRER_TXMPTY);
enable_intr();
wait:
while (com->etc == etc
diff --git a/sys/i386/isa/diskslice_machdep.c b/sys/i386/isa/diskslice_machdep.c
index adfd39c..752ec10 100644
--- a/sys/i386/isa/diskslice_machdep.c
+++ b/sys/i386/isa/diskslice_machdep.c
@@ -35,7 +35,7 @@
*
* from: @(#)ufs_disksubr.c 7.16 (Berkeley) 5/4/91
* from: ufs_disksubr.c,v 1.8 1994/06/07 01:21:39 phk Exp $
- * $Id: diskslice_machdep.c,v 1.31 1998/08/10 07:22:14 phk Exp $
+ * $Id: diskslice_machdep.c,v 1.32 1998/12/04 22:54:46 archie Exp $
*/
#include <sys/param.h>
@@ -103,11 +103,11 @@ check_part(sname, dp, offset, nsectors, ntracks, mbr_offset )
* apart from the cylinder being reduced modulo 1024. Always allow
* 1023/255/63.
*/
- if (ssector < ssector1
+ if ((ssector < ssector1
&& ((chs_ssect == nsectors && dp->dp_shd == ntracks - 1
&& chs_scyl == 1023)
|| (secpercyl != 0
- && (ssector1 - ssector) % (1024 * secpercyl) == 0))
+ && (ssector1 - ssector) % (1024 * secpercyl) == 0)))
|| (dp->dp_scyl == 255 && dp->dp_shd == 255
&& dp->dp_ssect == 255)) {
TRACE(("%s: C/H/S start %d/%d/%d, start %lu: allow\n",
@@ -122,11 +122,11 @@ check_part(sname, dp, offset, nsectors, ntracks, mbr_offset )
esector1 = ssector1 + dp->dp_size - 1;
/* Allow certain bogus C/H/S values for esector, as above. */
- if (esector < esector1
+ if ((esector < esector1
&& ((chs_esect == nsectors && dp->dp_ehd == ntracks - 1
&& chs_ecyl == 1023)
|| (secpercyl != 0
- && (esector1 - esector) % (1024 * secpercyl) == 0))
+ && (esector1 - esector) % (1024 * secpercyl) == 0)))
|| (dp->dp_ecyl == 255 && dp->dp_ehd == 255
&& dp->dp_esect == 255)) {
TRACE(("%s: C/H/S end %d/%d/%d, end %lu: allow\n",
diff --git a/sys/i386/isa/if_cs.c b/sys/i386/isa/if_cs.c
index 1ddfbca1..4a9c390 100644
--- a/sys/i386/isa/if_cs.c
+++ b/sys/i386/isa/if_cs.c
@@ -27,7 +27,7 @@
*/
/*
- * $Id: if_cs.c,v 1.7 1998/12/07 21:58:21 archie Exp $
+ * $Id: if_cs.c,v 1.8 1999/01/12 00:27:43 eivind Exp $
*
* Device driver for Crystal Semiconductor CS8920 based ethernet
* adapters. By Maxim Bolotin and Oleg Sharoiko, 27-April-1997
@@ -1215,11 +1215,11 @@ cs_mediaset(struct cs_softc *sc, int media)
case IFM_AUTO:
if ((error=enable_tp(sc))==0)
error = cs_duplex_auto(sc);
- else if (error=enable_bnc(sc))
+ else if ((error=enable_bnc(sc)) != 0)
error = enable_aui(sc);
break;
case IFM_10_T:
- if (error=enable_tp(sc))
+ if ((error=enable_tp(sc)) != 0)
break;
if (media & IFM_FDX)
cs_duplex_full(sc);
diff --git a/sys/i386/isa/if_ed.c b/sys/i386/isa/if_ed.c
index 9133a48..e7bab24 100644
--- a/sys/i386/isa/if_ed.c
+++ b/sys/i386/isa/if_ed.c
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_ed.c,v 1.147 1998/12/13 23:00:48 eivind Exp $
+ * $Id: if_ed.c,v 1.148 1999/01/19 00:21:38 peter Exp $
*/
/*
@@ -3211,7 +3211,7 @@ ed_hpp_write_mbufs(struct ed_softc *sc, struct mbuf *m, int dst)
len &= 1;
}
/* save last byte if needed */
- if (wantbyte = (len == 1))
+ if ((wantbyte = (len == 1)) != 0)
savebyte[0] = *data;
}
m = m->m_next; /* to next mbuf */
@@ -3247,7 +3247,7 @@ ed_hpp_write_mbufs(struct ed_softc *sc, struct mbuf *m, int dst)
data += (len & ~1);
len &= 1;
}
- if (wantbyte = (len == 1))
+ if ((wantbyte = (len == 1)) != 0)
savebyte[0] = *data;
} /* if len != 0 */
diff --git a/sys/i386/isa/if_ex.c b/sys/i386/isa/if_ex.c
index 2508bd7..0b689be 100644
--- a/sys/i386/isa/if_ex.c
+++ b/sys/i386/isa/if_ex.c
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_ex.c,v 1.12 1998/06/07 17:10:30 dfr Exp $
+ * $Id: if_ex.c,v 1.13 1998/10/22 05:58:39 bde Exp $
*/
/*
@@ -476,7 +476,7 @@ void ex_start(struct ifnet *ifp)
outsw(iobase + IO_PORT_REG, tmp16, 1);
}
outsw(iobase + IO_PORT_REG, mtod(m, caddr_t) + i, (m->m_len - i) / 2);
- if (i = (m->m_len - i) & 1)
+ if ((i = (m->m_len - i) & 1) != 0)
tmp16[0] = *(mtod(m, caddr_t) + m->m_len - 1);
}
if (i)
diff --git a/sys/i386/isa/if_ie.c b/sys/i386/isa/if_ie.c
index 4b22ae5..06db700 100644
--- a/sys/i386/isa/if_ie.c
+++ b/sys/i386/isa/if_ie.c
@@ -47,7 +47,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_ie.c,v 1.57 1998/10/22 05:58:39 bde Exp $
+ * $Id: if_ie.c,v 1.58 1998/12/10 01:49:49 archie Exp $
*/
/*
@@ -211,15 +211,15 @@ static void find_ie_mem_size(int unit);
static void chan_attn_timeout(void *rock);
static int command_and_wait(int unit, int command,
void volatile * pcmd, int);
-static void run_tdr(int unit, struct ie_tdr_cmd * cmd);
+static void run_tdr(int unit, volatile struct ie_tdr_cmd * cmd);
static int ierint(int unit, struct ie_softc * ie);
static int ietint(int unit, struct ie_softc * ie);
static int iernr(int unit, struct ie_softc * ie);
static void start_receiver(int unit);
static __inline int ieget(int, struct ie_softc *, struct mbuf **,
struct ether_header *, int *);
-static caddr_t setup_rfa(caddr_t ptr, struct ie_softc * ie);
-static int mc_setup(int, caddr_t, volatile struct ie_sys_ctl_block *);
+static v_caddr_t setup_rfa(v_caddr_t ptr, struct ie_softc * ie);
+static int mc_setup(int, v_caddr_t, volatile struct ie_sys_ctl_block *);
static void ie_mc_reset(int unit);
#ifdef DEBUG
@@ -317,7 +317,7 @@ static struct ie_softc {
volatile struct ie_xmit_cmd **xmit_cmds; /* ntxbufs worth */
volatile struct ie_xmit_buf **xmit_buffs; /* ntxbufs worth */
- u_char **xmit_cbuffs; /* ntxbufs worth */
+ volatile u_char **xmit_cbuffs; /* ntxbufs worth */
int xmit_count;
struct ie_en_addr mcast_addrs[MAXMCAST + 1];
@@ -820,7 +820,7 @@ ieattach(struct isa_device *dvp)
(volatile struct ie_xmit_cmd **)&ie->cbuffs[ie->nrxbufs];
ie->xmit_buffs =
(volatile struct ie_xmit_buf **)&ie->xmit_cmds[ie->ntxbufs];
- ie->xmit_cbuffs = (u_char **)&ie->xmit_buffs[ie->ntxbufs];
+ ie->xmit_cbuffs = (volatile u_char **)&ie->xmit_buffs[ie->ntxbufs];
ifp->if_softc = ie;
ifp->if_unit = unit;
@@ -1017,7 +1017,7 @@ ietint(int unit, struct ie_softc *ie)
* that we should do it.
*/
if (ie->want_mcsetup) {
- mc_setup(unit, (caddr_t) ie->xmit_cbuffs[0], ie->scb);
+ mc_setup(unit, (v_caddr_t) ie->xmit_cbuffs[0], ie->scb);
ie->want_mcsetup = 0;
}
/* Wish I knew why this seems to be necessary... */
@@ -1036,14 +1036,14 @@ static int
iernr(int unit, struct ie_softc *ie)
{
#ifdef doesnt_work
- setup_rfa((caddr_t) ie->rframes[0], ie);
+ setup_rfa((v_caddr_t) ie->rframes[0], ie);
ie->scb->ie_recv_list = MK_16(MEM, ie_softc[unit].rframes[0]);
command_and_wait(unit, IE_RU_START, 0, 0);
#else
/* This doesn't work either, but it doesn't hang either. */
command_and_wait(unit, IE_RU_DISABLE, 0, 0); /* just in case */
- setup_rfa((caddr_t) ie->rframes[0], ie); /* ignore cast-qual */
+ setup_rfa((v_caddr_t) ie->rframes[0], ie); /* ignore cast-qual */
ie->scb->ie_recv_list = MK_16(MEM, ie_softc[unit].rframes[0]);
command_and_wait(unit, IE_RU_START, 0, 0); /* was ENABLE */
@@ -1260,7 +1260,7 @@ ieget(int unit, struct ie_softc *ie, struct mbuf **mp,
/*
* Snarf the Ethernet header.
*/
- bcopy((caddr_t) ie->cbuffs[i], (caddr_t) ehp, sizeof *ehp);
+ bcopy((v_caddr_t) ie->cbuffs[i], (caddr_t) ehp, sizeof *ehp);
/* ignore cast-qual warning here */
/*
@@ -1348,8 +1348,8 @@ ieget(int unit, struct ie_softc *ie, struct mbuf **mp,
if (thislen > m->m_len - thismboff) {
int newlen = m->m_len - thismboff;
- bcopy((caddr_t) (ie->cbuffs[head] + offset),
- mtod(m, caddr_t) +thismboff, (unsigned) newlen);
+ bcopy((v_caddr_t) (ie->cbuffs[head] + offset),
+ mtod(m, v_caddr_t) +thismboff, (unsigned) newlen);
/* ignore cast-qual warning */
m = m->m_next;
thismboff = 0; /* new mbuf, so no offset */
@@ -1365,7 +1365,7 @@ ieget(int unit, struct ie_softc *ie, struct mbuf **mp,
* pointers, and so on.
*/
if (thislen < m->m_len - thismboff) {
- bcopy((caddr_t) (ie->cbuffs[head] + offset),
+ bcopy((v_caddr_t) (ie->cbuffs[head] + offset),
mtod(m, caddr_t) +thismboff, (unsigned) thislen);
thismboff += thislen; /* we are this far into the
* mbuf */
@@ -1377,7 +1377,7 @@ ieget(int unit, struct ie_softc *ie, struct mbuf **mp,
* buffer's contents into the current mbuf. Do the
* combination of the above actions.
*/
- bcopy((caddr_t) (ie->cbuffs[head] + offset),
+ bcopy((v_caddr_t) (ie->cbuffs[head] + offset),
mtod(m, caddr_t) + thismboff, (unsigned) thislen);
m = m->m_next;
thismboff = 0; /* new mbuf, start at the beginning */
@@ -1425,7 +1425,7 @@ ie_readframe(int unit, struct ie_softc *ie, int num/* frame number to read */)
#endif
- bcopy((caddr_t) (ie->rframes[num]), &rfd,
+ bcopy((v_caddr_t) (ie->rframes[num]), &rfd,
sizeof(struct ie_recv_frame_desc));
/*
@@ -1547,7 +1547,7 @@ iestart(struct ifnet *ifp)
{
struct ie_softc *ie = ifp->if_softc;
struct mbuf *m0, *m;
- unsigned char *buffer;
+ volatile unsigned char *buffer;
u_short len;
/*
@@ -1585,7 +1585,7 @@ iestart(struct ifnet *ifp)
*/
if (ie->arpcom.ac_if.if_bpf)
bpf_tap(&ie->arpcom.ac_if,
- ie->xmit_cbuffs[ie->xmit_count], len);
+ (void *)ie->xmit_cbuffs[ie->xmit_count], len);
#endif
ie->xmit_buffs[ie->xmit_count]->ie_xmit_flags =
@@ -1640,7 +1640,7 @@ check_ie_present(int unit, caddr_t where, unsigned size)
scp = (volatile struct ie_sys_conf_ptr *) (uintptr_t)
(realbase + IE_SCP_ADDR);
- bzero((char *) scp, sizeof *scp);
+ bzero((volatile char *) scp, sizeof *scp);
/*
* First we put the ISCP at the bottom of memory; this tests to make
@@ -1649,13 +1649,13 @@ check_ie_present(int unit, caddr_t where, unsigned size)
* operation.
*/
iscp = (volatile struct ie_int_sys_conf_ptr *) where;
- bzero((char *)iscp, sizeof *iscp);
+ bzero((volatile char *)iscp, sizeof *iscp);
scb = (volatile struct ie_sys_ctl_block *) where;
- bzero((char *)scb, sizeof *scb);
+ bzero((volatile char *)scb, sizeof *scb);
scp->ie_bus_use = ie_softc[unit].bus_use; /* 8-bit or 16-bit */
- scp->ie_iscp_ptr = (caddr_t) ((volatile caddr_t) iscp -
+ scp->ie_iscp_ptr = (v_caddr_t) ((volatile caddr_t) iscp -
(volatile caddr_t) (volatile uintptr_t)
realbase);
@@ -1678,10 +1678,10 @@ check_ie_present(int unit, caddr_t where, unsigned size)
iscp = (void *) Align((caddr_t) (uintptr_t)
(realbase + IE_SCP_ADDR -
sizeof(struct ie_int_sys_conf_ptr)));
- bzero((char *) iscp, sizeof *iscp); /* ignore cast-qual */
+ bzero((volatile char *) iscp, sizeof *iscp); /* ignore cast-qual */
- scp->ie_iscp_ptr = (caddr_t) ((caddr_t) iscp -
- (caddr_t) (uintptr_t) realbase);
+ scp->ie_iscp_ptr = (v_caddr_t) ((v_caddr_t) iscp -
+ (v_caddr_t) (uintptr_t) realbase);
/* ignore cast-qual */
iscp->ie_busy = 1;
@@ -1973,7 +1973,7 @@ command_and_wait(int unit, int cmd, volatile void *pcmd, int mask)
* Run the time-domain reflectometer...
*/
static void
-run_tdr(int unit, struct ie_tdr_cmd *cmd)
+run_tdr(int unit, volatile struct ie_tdr_cmd *cmd)
{
int result;
@@ -2026,10 +2026,10 @@ start_receiver(int unit)
* Here is a helper routine for iernr() and ieinit(). This sets up
* the RFA.
*/
-static caddr_t
-setup_rfa(caddr_t ptr, struct ie_softc * ie)
+static v_caddr_t
+setup_rfa(v_caddr_t ptr, struct ie_softc * ie)
{
- volatile struct ie_recv_frame_desc *rfd = (void *) ptr;
+ volatile struct ie_recv_frame_desc *rfd = (volatile void *)ptr;
volatile struct ie_recv_buf_desc *rbd;
int i;
int unit = ie - &ie_softc[0];
@@ -2037,11 +2037,11 @@ setup_rfa(caddr_t ptr, struct ie_softc * ie)
/* First lay them out */
for (i = 0; i < ie->nframes; i++) {
ie->rframes[i] = rfd;
- bzero((char *) rfd, sizeof *rfd); /* ignore cast-qual */
+ bzero((volatile char *) rfd, sizeof *rfd); /* ignore cast-qual */
rfd++;
}
- ptr = (caddr_t) Align((caddr_t) rfd); /* ignore cast-qual */
+ ptr = (v_caddr_t) Align((v_caddr_t) rfd); /* ignore cast-qual */
/* Now link them together */
for (i = 0; i < ie->nframes; i++) {
@@ -2057,17 +2057,17 @@ setup_rfa(caddr_t ptr, struct ie_softc * ie)
* set aside a bit of slop in each buffer, to make sure that we have
* enough space to hold a single frame in every buffer.
*/
- rbd = (void *) ptr;
+ rbd = (volatile void *) ptr;
for (i = 0; i < ie->nrxbufs; i++) {
ie->rbuffs[i] = rbd;
- bzero((char *)rbd, sizeof *rbd);
+ bzero((volatile char *)rbd, sizeof *rbd);
ptr = (caddr_t) Align(ptr + sizeof *rbd);
rbd->ie_rbd_length = IE_RBUF_SIZE;
rbd->ie_rbd_buffer = MK_24(MEM, ptr);
- ie->cbuffs[i] = (void *) ptr;
+ ie->cbuffs[i] = (volatile void *) ptr;
ptr += IE_RBUF_SIZE;
- rbd = (void *) ptr;
+ rbd = (volatile void *) ptr;
}
/* Now link them together */
@@ -2100,18 +2100,18 @@ setup_rfa(caddr_t ptr, struct ie_softc * ie)
* Call at splimp().
*/
static int
-mc_setup(int unit, caddr_t ptr,
+mc_setup(int unit, v_caddr_t ptr,
volatile struct ie_sys_ctl_block * scb)
{
struct ie_softc *ie = &ie_softc[unit];
- volatile struct ie_mcast_cmd *cmd = (void *) ptr;
+ volatile struct ie_mcast_cmd *cmd = (volatile void *) ptr;
cmd->com.ie_cmd_status = 0;
cmd->com.ie_cmd_cmd = IE_CMD_MCAST | IE_CMD_LAST;
cmd->com.ie_cmd_link = 0xffff;
/* ignore cast-qual */
- bcopy((caddr_t) ie->mcast_addrs, (caddr_t) cmd->ie_mcast_addrs,
+ bcopy((v_caddr_t) ie->mcast_addrs, (v_caddr_t) cmd->ie_mcast_addrs,
ie->mcast_count * sizeof *ie->mcast_addrs);
cmd->ie_mcast_bytes = ie->mcast_count * 6; /* grrr... */
@@ -2138,16 +2138,16 @@ ieinit(int unit)
{
struct ie_softc *ie = &ie_softc[unit];
volatile struct ie_sys_ctl_block *scb = ie->scb;
- caddr_t ptr;
+ v_caddr_t ptr;
int i;
- ptr = (caddr_t) Align((caddr_t) scb + sizeof *scb);
+ ptr = (v_caddr_t) Align((v_caddr_t) scb + sizeof *scb);
/*
* Send the configure command first.
*/
{
- volatile struct ie_config_cmd *cmd = (void *) ptr;
+ volatile struct ie_config_cmd *cmd = (volatile void *) ptr;
ie_setup_config(cmd, ie->promisc,
ie->hard_type == IE_STARLAN10);
@@ -2167,14 +2167,14 @@ ieinit(int unit)
* Now send the Individual Address Setup command.
*/
{
- volatile struct ie_iasetup_cmd *cmd = (void *) ptr;
+ volatile struct ie_iasetup_cmd *cmd = (volatile void *) ptr;
cmd->com.ie_cmd_status = 0;
cmd->com.ie_cmd_cmd = IE_CMD_IASETUP | IE_CMD_LAST;
cmd->com.ie_cmd_link = 0xffff;
- bcopy((char *)ie_softc[unit].arpcom.ac_enaddr,
- (char *)&cmd->ie_address, sizeof cmd->ie_address);
+ bcopy((volatile char *)ie_softc[unit].arpcom.ac_enaddr,
+ (volatile char *)&cmd->ie_address, sizeof cmd->ie_address);
scb->ie_command_list = MK_16(MEM, cmd);
if (command_and_wait(unit, IE_CU_START, cmd, IE_STAT_COMPL)
|| !(cmd->com.ie_cmd_status & IE_STAT_OK)) {
@@ -2187,7 +2187,7 @@ ieinit(int unit)
/*
* Now run the time-domain reflectometer.
*/
- run_tdr(unit, (void *) ptr);
+ run_tdr(unit, (volatile void *) ptr);
/*
* Acknowledge any interrupts we have generated thus far.
@@ -2206,25 +2206,25 @@ ieinit(int unit)
/* transmit command buffers */
for (i = 0; i < ie->ntxbufs; i++) {
- ie->xmit_cmds[i] = (void *) ptr;
+ ie->xmit_cmds[i] = (volatile void *) ptr;
ptr += sizeof *ie->xmit_cmds[i];
ptr = Align(ptr);
- ie->xmit_buffs[i] = (void *)ptr;
+ ie->xmit_buffs[i] = (volatile void *)ptr;
ptr += sizeof *ie->xmit_buffs[i];
ptr = Align(ptr);
}
/* transmit buffers */
for (i = 0; i < ie->ntxbufs - 1; i++) {
- ie->xmit_cbuffs[i] = (void *)ptr;
+ ie->xmit_cbuffs[i] = (volatile void *)ptr;
ptr += IE_BUF_LEN;
ptr = Align(ptr);
}
- ie->xmit_cbuffs[ie->ntxbufs - 1] = (void *) ptr;
+ ie->xmit_cbuffs[ie->ntxbufs - 1] = (volatile void *) ptr;
for (i = 1; i < ie->ntxbufs; i++) {
- bzero((caddr_t) ie->xmit_cmds[i], sizeof *ie->xmit_cmds[i]);
- bzero((caddr_t) ie->xmit_buffs[i], sizeof *ie->xmit_buffs[i]);
+ bzero((v_caddr_t) ie->xmit_cmds[i], sizeof *ie->xmit_cmds[i]);
+ bzero((v_caddr_t) ie->xmit_buffs[i], sizeof *ie->xmit_buffs[i]);
}
/*
@@ -2426,7 +2426,7 @@ print_rbd(volatile struct ie_recv_buf_desc * rbd)
printf("RBD at %p:\n"
"actual %04x, next %04x, buffer %p\n"
"length %04x, mbz %04x\n",
- (void *) rbd,
+ (volatile void *) rbd,
rbd->ie_rbd_actual, rbd->ie_rbd_next,
(void *) rbd->ie_rbd_buffer,
rbd->ie_rbd_length, rbd->mbz);
diff --git a/sys/kern/subr_diskmbr.c b/sys/kern/subr_diskmbr.c
index adfd39c..752ec10 100644
--- a/sys/kern/subr_diskmbr.c
+++ b/sys/kern/subr_diskmbr.c
@@ -35,7 +35,7 @@
*
* from: @(#)ufs_disksubr.c 7.16 (Berkeley) 5/4/91
* from: ufs_disksubr.c,v 1.8 1994/06/07 01:21:39 phk Exp $
- * $Id: diskslice_machdep.c,v 1.31 1998/08/10 07:22:14 phk Exp $
+ * $Id: diskslice_machdep.c,v 1.32 1998/12/04 22:54:46 archie Exp $
*/
#include <sys/param.h>
@@ -103,11 +103,11 @@ check_part(sname, dp, offset, nsectors, ntracks, mbr_offset )
* apart from the cylinder being reduced modulo 1024. Always allow
* 1023/255/63.
*/
- if (ssector < ssector1
+ if ((ssector < ssector1
&& ((chs_ssect == nsectors && dp->dp_shd == ntracks - 1
&& chs_scyl == 1023)
|| (secpercyl != 0
- && (ssector1 - ssector) % (1024 * secpercyl) == 0))
+ && (ssector1 - ssector) % (1024 * secpercyl) == 0)))
|| (dp->dp_scyl == 255 && dp->dp_shd == 255
&& dp->dp_ssect == 255)) {
TRACE(("%s: C/H/S start %d/%d/%d, start %lu: allow\n",
@@ -122,11 +122,11 @@ check_part(sname, dp, offset, nsectors, ntracks, mbr_offset )
esector1 = ssector1 + dp->dp_size - 1;
/* Allow certain bogus C/H/S values for esector, as above. */
- if (esector < esector1
+ if ((esector < esector1
&& ((chs_esect == nsectors && dp->dp_ehd == ntracks - 1
&& chs_ecyl == 1023)
|| (secpercyl != 0
- && (esector1 - esector) % (1024 * secpercyl) == 0))
+ && (esector1 - esector) % (1024 * secpercyl) == 0)))
|| (dp->dp_ecyl == 255 && dp->dp_ehd == 255
&& dp->dp_esect == 255)) {
TRACE(("%s: C/H/S end %d/%d/%d, end %lu: allow\n",
diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c
index 569f04b..bd188d3 100644
--- a/sys/kern/subr_smp.c
+++ b/sys/kern/subr_smp.c
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.87 1999/01/12 00:19:31 eivind Exp $
+ * $Id: mp_machdep.c,v 1.88 1999/01/20 04:24:22 jkh Exp $
*/
#include "opt_smp.h"
@@ -378,7 +378,7 @@ mp_probe(void)
POSTCODE(MP_PROBE_POST);
/* see if EBDA exists */
- if (segment = (u_long) * (u_short *) (KERNBASE + 0x40e)) {
+ if ((segment = (u_long) * (u_short *) (KERNBASE + 0x40e)) != 0) {
/* search first 1K of EBDA */
target = (u_int32_t) (segment << 4);
if ((x = search_for_sig(target, 1024 / 4)) >= 0)
OpenPOWER on IntegriCloud