Clean up for higher warning level.

This commit is contained in:
briggs 1996-04-01 01:35:48 +00:00
parent 25b6ab86fe
commit 1fa595a2f1
5 changed files with 32 additions and 36 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_disasm.c,v 1.12 1994/11/14 20:53:52 gwr Exp $ */
/* $NetBSD: db_disasm.c,v 1.13 1996/04/01 01:38:01 briggs Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -67,6 +67,7 @@
#include <machine/db_machdep.h>
#include <ddb/db_sym.h>
#include <ddb/db_output.h>
#include <m68k/m68k/db_disasm.h>
void get_modregstr __P((dis_buffer_t *, int, int, int, int));
@ -170,10 +171,6 @@ db_disasm(loc, moto_syntax)
u_short opc;
dis_func_t *func;
dis_buffer_t dbuf;
char *symname = NULL;
db_expr_t diff;
db_sym_t sym;
struct nlist *nl;
dbuf.casm = dbuf.dasm = asm_buffer;
dbuf.cinfo = dbuf.info = info_buffer;
@ -553,7 +550,6 @@ opcode_misc(dbuf, opc)
{
char *tmp;
int sz;
u_short ext;
tmp = NULL;
@ -1369,7 +1365,7 @@ opcode_fpu(dbuf, opc)
u_short opc;
{
u_short ext;
int sz, type, opmode;
int type, opmode;
type = BITFIELD(opc,8,6);
switch (type) {
@ -1581,7 +1577,7 @@ opcode_fmove_ext(dbuf, opc, ext)
u_short opc, ext;
{
int sz;
if (BITFIELD(ext,15,13) == 3) {
/* fmove r ==> m */
addstr(dbuf, "fmov");
@ -1684,7 +1680,7 @@ opcode_mmu(dbuf, opc)
u_short opc;
{
u_short ext;
int sz, type, opmode;
int type;
type = BITFIELD(opc,8,6);
switch (type) {
@ -1968,9 +1964,6 @@ opcode_mmu040(dbuf, opc)
dis_buffer_t *dbuf;
u_short opc;
{
u_short ext;
int sz, type;
if (ISBITSET(opc, 6)) {
addstr(dbuf, "ptest");
if (ISBITSET(opc, 5))
@ -2269,7 +2262,7 @@ addstr(dbuf, s)
dis_buffer_t *dbuf;
const char *s;
{
while (*dbuf->casm++ = *s++)
while ((*dbuf->casm++ = *s++))
;
dbuf->casm--;
}
@ -2282,7 +2275,7 @@ iaddstr(dbuf, s)
dis_buffer_t *dbuf;
const char *s;
{
while (*dbuf->cinfo++ = *s++)
while ((*dbuf->cinfo++ = *s++))
;
dbuf->cinfo--;
}
@ -3067,7 +3060,7 @@ printu_wb(dbuf, val, sz, base)
*++p = "0123456789abcdef"[val % base];
} while (val /= base);
while (ch = *p--)
while ((ch = *p--))
addchar(ch);
*dbuf->casm = 0;
@ -3108,7 +3101,7 @@ iprintu_wb(dbuf, val, sz, base)
*++p = "0123456789abcdef"[val % base];
} while (val /= base);
while (ch = *p--)
while ((ch = *p--))
iaddchar(ch);
*dbuf->cinfo = 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_disasm.h,v 1.3 1994/10/26 07:51:05 cgd Exp $ */
/* $NetBSD: db_disasm.h,v 1.4 1996/04/01 01:38:12 briggs Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -425,3 +425,7 @@ typedef struct dis_buffer dis_buffer_t;
#define PRINT_DREG(dbuf, reg) addstr(dbuf, dregs[reg])
#define PRINT_AREG(dbuf, reg) addstr(dbuf, aregs[reg])
vm_offset_t db_disasm __P((vm_offset_t loc, boolean_t moto_syntax));
void get_modregstr_moto __P((dis_buffer_t *dbuf, int bit, int mod, int sz, int dd));
void get_modregstr_mit __P((dis_buffer_t *dbuf, int bit, int mod, int sz, int dd));
u_long get_areg_val __P((int reg));

View File

@ -1,4 +1,4 @@
/* $NetBSD: ns_cksum.c,v 1.4 1994/10/26 07:51:12 cgd Exp $ */
/* $NetBSD: ns_cksum.c,v 1.5 1996/04/01 01:38:15 briggs Exp $ */
/*
* Copyright (c) 1982, 1988 Regents of the University of California.
@ -37,6 +37,7 @@
#include <sys/param.h>
#include <sys/mbuf.h>
#include <netns/ns_var.h>
/*
* Checksum routine for Network Systems Protocol Packets (Big-Endian).

View File

@ -1,4 +1,4 @@
/* $NetBSD: nubus.c,v 1.16 1996/03/17 01:33:35 thorpej Exp $ */
/* $NetBSD: nubus.c,v 1.17 1996/04/01 01:35:48 briggs Exp $ */
/*
* Copyright (c) 1995 Allen Briggs. All rights reserved.
@ -34,6 +34,7 @@
#include <sys/device.h>
#include <machine/cpu.h>
#include <machine/devconf.h>
#include <vm/vm.h>
@ -46,8 +47,6 @@ static int nubus_debug = 0x01;
#define NDB_ARITH 0x4
#endif
extern int matchbyname();
static int nubusprint __P((void *aux, char *name));
static void nubusattach __P((struct device *parent, struct device *self,
void *aux));
@ -56,7 +55,9 @@ static int probe_slot __P((int slot, nubus_slot *fmt));
static u_long IncPtr __P((nubus_slot *fmt, u_long base, long amt));
static u_long nubus_calc_CRC __P((nubus_slot *fmt));
static u_char GetByte __P((nubus_slot *fmt, u_long ptr));
static u_short GetWord __P((nubus_slot *fmt, u_long ptr));
#ifdef notyet
/* unused */ static u_short GetWord __P((nubus_slot *fmt, u_long ptr));
#endif
static u_long GetLong __P((nubus_slot *fmt, u_long ptr));
struct cfattach nubus_ca = {
@ -110,8 +111,6 @@ nubusprint(aux, name)
char *name;
{
nubus_slot *fmt;
int slot;
char *info;
fmt = (nubus_slot *) aux;
if (name) {
@ -160,7 +159,6 @@ probe_slot(slot, fmt)
{
caddr_t rom_probe;
u_long hdr;
u_long phys;
u_char data;
int hdr_size, i;
@ -369,6 +367,8 @@ GetByte(fmt, ptr)
return *(caddr_t)ptr;
}
#ifdef notyet
/* Nothing uses this, yet */
static u_short
GetWord(fmt, ptr)
nubus_slot *fmt;
@ -381,6 +381,7 @@ GetWord(fmt, ptr)
s |= GetByte(fmt, ptr);
return s;
}
#endif
static u_long
GetLong(fmt, ptr)
@ -403,8 +404,6 @@ nubus_get_main_dir(slot, dir_return)
nubus_slot *slot;
nubus_dir *dir_return;
{
u_long off;
#if DEBUG
if (nubus_debug & NDB_FOLLOW)
printf("nubus_get_main_dir(0x%x, 0x%x)\n",

View File

@ -1,4 +1,4 @@
/* $NetBSD: nubus.c,v 1.16 1996/03/17 01:33:35 thorpej Exp $ */
/* $NetBSD: nubus.c,v 1.17 1996/04/01 01:35:48 briggs Exp $ */
/*
* Copyright (c) 1995 Allen Briggs. All rights reserved.
@ -34,6 +34,7 @@
#include <sys/device.h>
#include <machine/cpu.h>
#include <machine/devconf.h>
#include <vm/vm.h>
@ -46,8 +47,6 @@ static int nubus_debug = 0x01;
#define NDB_ARITH 0x4
#endif
extern int matchbyname();
static int nubusprint __P((void *aux, char *name));
static void nubusattach __P((struct device *parent, struct device *self,
void *aux));
@ -56,7 +55,9 @@ static int probe_slot __P((int slot, nubus_slot *fmt));
static u_long IncPtr __P((nubus_slot *fmt, u_long base, long amt));
static u_long nubus_calc_CRC __P((nubus_slot *fmt));
static u_char GetByte __P((nubus_slot *fmt, u_long ptr));
static u_short GetWord __P((nubus_slot *fmt, u_long ptr));
#ifdef notyet
/* unused */ static u_short GetWord __P((nubus_slot *fmt, u_long ptr));
#endif
static u_long GetLong __P((nubus_slot *fmt, u_long ptr));
struct cfattach nubus_ca = {
@ -110,8 +111,6 @@ nubusprint(aux, name)
char *name;
{
nubus_slot *fmt;
int slot;
char *info;
fmt = (nubus_slot *) aux;
if (name) {
@ -160,7 +159,6 @@ probe_slot(slot, fmt)
{
caddr_t rom_probe;
u_long hdr;
u_long phys;
u_char data;
int hdr_size, i;
@ -369,6 +367,8 @@ GetByte(fmt, ptr)
return *(caddr_t)ptr;
}
#ifdef notyet
/* Nothing uses this, yet */
static u_short
GetWord(fmt, ptr)
nubus_slot *fmt;
@ -381,6 +381,7 @@ GetWord(fmt, ptr)
s |= GetByte(fmt, ptr);
return s;
}
#endif
static u_long
GetLong(fmt, ptr)
@ -403,8 +404,6 @@ nubus_get_main_dir(slot, dir_return)
nubus_slot *slot;
nubus_dir *dir_return;
{
u_long off;
#if DEBUG
if (nubus_debug & NDB_FOLLOW)
printf("nubus_get_main_dir(0x%x, 0x%x)\n",