Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64 Warning police. Mostly useless format warni...
details: https://anonhg.NetBSD.org/src/rev/21a110b56056
branches: trunk
changeset: 500057:21a110b56056
user: fvdl <fvdl%NetBSD.org@localhost>
date: Mon Dec 04 16:01:18 2000 +0000
description:
Warning police. Mostly useless format warnings. Switch Makefile for
kernel compiles to the warning flags that other ports also use.
diffstat:
sys/arch/sparc64/conf/Makefile.sparc64 | 6 +-
sys/arch/sparc64/dev/ebus.c | 11 +-
sys/arch/sparc64/dev/psycho.c | 27 ++++---
sys/arch/sparc64/sparc64/clock.c | 6 +-
sys/arch/sparc64/sparc64/cpu.c | 4 +-
sys/arch/sparc64/sparc64/db_interface.c | 70 +++++++++++---------
sys/arch/sparc64/sparc64/db_trace.c | 106 +++++++++++++++++++++----------
sys/arch/sparc64/sparc64/emul.c | 4 +-
sys/arch/sparc64/sparc64/intr.c | 3 +-
sys/arch/sparc64/sparc64/machdep.c | 47 +++++++++----
sys/arch/sparc64/sparc64/pmap.c | 12 ++-
sys/arch/sparc64/sparc64/trap.c | 41 +++++++-----
12 files changed, 207 insertions(+), 130 deletions(-)
diffs (truncated from 837 to 300 lines):
diff -r 3157eaf2b164 -r 21a110b56056 sys/arch/sparc64/conf/Makefile.sparc64
--- a/sys/arch/sparc64/conf/Makefile.sparc64 Mon Dec 04 13:22:17 2000 +0000
+++ b/sys/arch/sparc64/conf/Makefile.sparc64 Mon Dec 04 16:01:18 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.sparc64,v 1.31 2000/09/28 19:56:15 eeh Exp $
+# $NetBSD: Makefile.sparc64,v 1.32 2000/12/04 16:01:18 fvdl Exp $
# Makefile for NetBSD
#
@@ -64,8 +64,10 @@
INCLUDES= -I. -I$S/arch -I$S -nostdinc
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL ${SVR4}
-CWARNFLAGS= -Wimplicit -Wunused -Wswitch -Wcomment -Wtrigraphs -Wchar-subscripts -Wparentheses -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
+#CWARNFLAGS= -Wimplicit -Wunused -Wswitch -Wcomment -Wtrigraphs -Wchar-subscripts -Wparentheses -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-main -Werror
#CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes
+CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-main
+CWARNFLAGS+= -Wno-uninitialized
CFLAGS= ${DEBUG} ${COPTS} ${CWARNFLAGS} -Wa,-Av9a -mno-fpu
.if defined(PROF)
# We need to run the compiler in medlow memory model.
diff -r 3157eaf2b164 -r 21a110b56056 sys/arch/sparc64/dev/ebus.c
--- a/sys/arch/sparc64/dev/ebus.c Mon Dec 04 13:22:17 2000 +0000
+++ b/sys/arch/sparc64/dev/ebus.c Mon Dec 04 16:01:18 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ebus.c,v 1.17 2000/07/27 14:17:10 mrg Exp $ */
+/* $NetBSD: ebus.c,v 1.18 2000/12/04 16:01:18 fvdl Exp $ */
/*
* Copyright (c) 1999, 2000 Matthew R. Green
@@ -330,7 +330,7 @@
hi = ea->ea_regs[i].hi & sc->sc_intmapmask.hi;
lo = ea->ea_regs[i].lo & sc->sc_intmapmask.lo;
- DPRINTF(EDB_INTRMAP, ("; reg hi.lo %08x.08x masked to %08x.%08x", ea->ea_regs[i].hi, ea->ea_regs[i].lo, hi, lo));
+ DPRINTF(EDB_INTRMAP, ("; reg hi.lo %08x.%08x masked to %08x.%08x", ea->ea_regs[i].hi, ea->ea_regs[i].lo, hi, lo));
for (k = 0; k < sc->sc_nintmap; k++) {
DPRINTF(EDB_INTRMAP, ("; checking hi.lo %08x.%08x intr %x", sc->sc_intmap[k].hi, sc->sc_intmap[k].lo, sc->sc_intmap[k].intr));
if (hi == sc->sc_intmap[k].hi &&
@@ -476,7 +476,7 @@
bus_addr_t hi, lo;
int i;
- DPRINTF(EDB_BUSMAP, ("\n_ebus_bus_map: type %d off %016llx sz %x flags %d va %p", (int)t->type, (u_int64_t)offset, (int)size, (int)flags, vaddr));
+ DPRINTF(EDB_BUSMAP, ("\n_ebus_bus_map: type %d off %016llx sz %x flags %d va %p", (int)t->type, (unsigned long long)offset, (int)size, (int)flags, (void *)vaddr));
hi = offset >> 32UL;
lo = offset & 0xffffffff;
@@ -494,7 +494,8 @@
sc->sc_range[i].phys_lo;
pciaddr += lo;
DPRINTF(EDB_BUSMAP, ("\n_ebus_bus_map: mapping paddr offset %qx pciaddr %qx\n",
- offset, pciaddr));
+ (unsigned long long)offset,
+ (unsigned long long)pciaddr));
/* pass it onto the psycho */
return (bus_space_map2(sc->sc_bustag, t->type, pciaddr,
size, flags, vaddr, hp));
@@ -522,7 +523,7 @@
if (offset != paddr)
continue;
- DPRINTF(EDB_BUSMAP, ("\n_ebus_bus_mmap: mapping paddr %qx\n", paddr));
+ DPRINTF(EDB_BUSMAP, ("\n_ebus_bus_mmap: mapping paddr %qx\n", (unsigned long long)paddr));
return (bus_space_mmap(sc->sc_bustag, 0, paddr,
flags, hp));
}
diff -r 3157eaf2b164 -r 21a110b56056 sys/arch/sparc64/dev/psycho.c
--- a/sys/arch/sparc64/dev/psycho.c Mon Dec 04 13:22:17 2000 +0000
+++ b/sys/arch/sparc64/dev/psycho.c Mon Dec 04 16:01:18 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: psycho.c,v 1.26 2000/11/18 03:49:38 mrg Exp $ */
+/* $NetBSD: psycho.c,v 1.27 2000/12/04 16:01:18 fvdl Exp $ */
/*
* Copyright (c) 1999, 2000 Matthew R. Green
@@ -332,7 +332,7 @@
pp->pp_nregs = nregs;
break;
default:
- panic("illegal simba funcion %d\n");
+ panic("illegal simba funcion %d\n", fn);
}
pp->pp_pcictl = &sc->sc_regs->psy_pcictl[0];
/* link us in .. */
@@ -821,7 +821,8 @@
struct psycho_softc *sc = pp->pp_sc;
int i, ss;
- DPRINTF(PDB_BUSMAP, ("_psycho_bus_map: type %d off %qx sz %qx flags %d va %p", t->type, offset, size, flags, vaddr));
+ DPRINTF(PDB_BUSMAP, ("_psycho_bus_map: type %d off %qx sz %qx flags %d va %p", t->type, (unsigned long long)offset, (unsigned long long)size, flags,
+ (void *)vaddr));
ss = get_childspace(t->type);
DPRINTF(PDB_BUSMAP, (" cspace %d", ss));
@@ -836,7 +837,8 @@
paddr = pp->pp_range[i].phys_lo + offset;
paddr |= ((bus_addr_t)pp->pp_range[i].phys_hi<<32);
DPRINTF(PDB_BUSMAP, ("\n_psycho_bus_map: mapping paddr space %lx offset %lx paddr %qx\n",
- (long)ss, (long)offset, paddr));
+ (long)ss, (long)offset,
+ (unsigned long long)paddr));
return (bus_space_map2(sc->sc_bustag, t->type, paddr,
size, flags, vaddr, hp));
}
@@ -859,7 +861,7 @@
ss = get_childspace(t->type);
- DPRINTF(PDB_BUSMAP, ("_psycho_bus_mmap: type %d flags %d pa %qx\n", btype, flags, paddr));
+ DPRINTF(PDB_BUSMAP, ("_psycho_bus_mmap: type %d flags %d pa %qx\n", btype, flags, (unsigned long long)paddr));
for (i = 0; i < pp->pp_nrange; i++) {
bus_addr_t paddr;
@@ -870,7 +872,8 @@
paddr = pp->pp_range[i].phys_lo + offset;
paddr |= ((bus_addr_t)pp->pp_range[i].phys_hi<<32);
DPRINTF(PDB_BUSMAP, ("\n_psycho_bus_mmap: mapping paddr space %lx offset %lx paddr %qx\n",
- (long)ss, (long)offset, paddr));
+ (long)ss, (long)offset,
+ (unsigned long long)paddr));
return (bus_space_mmap(sc->sc_bustag, 0, paddr,
flags, hp));
}
@@ -958,7 +961,7 @@
int64_t intrmap = 0;
int i;
- DPRINTF(PDB_INTR, ("\npsycho: intr %lx: %lx\nHunting for IRQ...\n",
+ DPRINTF(PDB_INTR, ("\npsycho: intr %lx: %p\nHunting for IRQ...\n",
(long)ino, intrlev[ino]));
if ((ino & INTMAP_OBIO) == 0) {
/*
@@ -977,7 +980,7 @@
*/
i = INTPCIOBINOX(vec);
if (i > INTPCI_MAXOBINO)
- panic("ino %d", vec);
+ panic("ino %ld", vec);
intrmapptr = &((&sc->sc_regs->scsi_int_map)[i]);
intrclrptr = &((&sc->sc_regs->scsi_clr_int)[i]);
@@ -994,15 +997,17 @@
* valid bit so so make sure only this bit is changed.
*/
intrmap = *intrmapptr;
- DPRINTF(PDB_INTR, ("; read intrmap = %016qx", intrmap));
+ DPRINTF(PDB_INTR, ("; read intrmap = %016qx",
+ (unsigned long long)intrmap));
/* Enable the interrupt */
intrmap |= INTMAP_V;
DPRINTF(PDB_INTR, ("; addr of intrmapptr = %p", intrmapptr));
- DPRINTF(PDB_INTR, ("; writing intrmap = %016qx\n", intrmap));
+ DPRINTF(PDB_INTR, ("; writing intrmap = %016qx\n",
+ (unsigned long long)intrmap));
*intrmapptr = intrmap;
DPRINTF(PDB_INTR, ("; reread intrmap = %016qx",
- (intrmap = *intrmapptr)));
+ (unsigned long long)(intrmap = *intrmapptr)));
}
#ifdef NOT_DEBUG
if (psycho_debug & PDB_INTR) {
diff -r 3157eaf2b164 -r 21a110b56056 sys/arch/sparc64/sparc64/clock.c
--- a/sys/arch/sparc64/sparc64/clock.c Mon Dec 04 13:22:17 2000 +0000
+++ b/sys/arch/sparc64/sparc64/clock.c Mon Dec 04 16:01:18 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: clock.c,v 1.32 2000/09/17 19:23:37 eeh Exp $ */
+/* $NetBSD: clock.c,v 1.33 2000/12/04 16:01:19 fvdl Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -273,7 +273,7 @@
/* We can panic now or take a datafault later... */
if (sbi->si_bh != newaddr)
panic("sbus_wenable: address %p changed to %p\n",
- (vaddr_t)sbi->si_bh, (vaddr_t)newaddr);
+ (void *)sbi->si_bh, (void *)newaddr);
}
return (err);
}
@@ -348,7 +348,7 @@
/* We can panic now or take a datafault later... */
if (ebi->ei_bh != newaddr)
panic("ebus_wenable: address %p changed to %p\n",
- (vaddr_t)ebi->ei_bh, (vaddr_t)newaddr);
+ (void *)ebi->ei_bh, (void *)newaddr);
}
return (err);
}
diff -r 3157eaf2b164 -r 21a110b56056 sys/arch/sparc64/sparc64/cpu.c
--- a/sys/arch/sparc64/sparc64/cpu.c Mon Dec 04 13:22:17 2000 +0000
+++ b/sys/arch/sparc64/sparc64/cpu.c Mon Dec 04 16:01:18 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.10 2000/06/29 07:37:57 mrg Exp $ */
+/* $NetBSD: cpu.c,v 1.11 2000/12/04 16:01:19 fvdl Exp $ */
/*
* Copyright (c) 1996
@@ -197,7 +197,7 @@
break;
default:
panic("cpu_start: stack size %x not a machine page size\n",
- size);
+ (unsigned)size);
}
return (pte|TLB_L);
}
diff -r 3157eaf2b164 -r 21a110b56056 sys/arch/sparc64/sparc64/db_interface.c
--- a/sys/arch/sparc64/sparc64/db_interface.c Mon Dec 04 13:22:17 2000 +0000
+++ b/sys/arch/sparc64/sparc64/db_interface.c Mon Dec 04 16:01:18 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_interface.c,v 1.46 2000/11/21 16:34:53 chs Exp $ */
+/* $NetBSD: db_interface.c,v 1.47 2000/12/04 16:01:19 fvdl Exp $ */
/*
* Mach Operating System
@@ -184,7 +184,8 @@
switch (type) {
case T_BREAKPOINT: /* breakpoint */
- printf("kdb breakpoint at %p\n", tf->tf_pc);
+ printf("kdb breakpoint at %llx\n",
+ (unsigned long long)tf->tf_pc);
break;
case -1: /* keyboard interrupt */
printf("kdb tf=%p\n", tf);
@@ -340,11 +341,11 @@
p = buf;
for (i=0; i<64;) {
#ifdef __arch64__
- db_printf("%2d:%016.16lx %016.16lx ", i++, *p++, *p++);
- db_printf("%2d:%016.16lx %016.16lx\n", i++, *p++, *p++);
+ db_printf("%2d:%16.16lx %16.16lx ", i++, *p++, *p++);
+ db_printf("%2d:%16.16lx %16.16lx\n", i++, *p++, *p++);
#else
- db_printf("%2d:%016.16qx %016.16qx ", i++, *p++, *p++);
- db_printf("%2d:%016.16qx %016.16qx\n", i++, *p++, *p++);
+ db_printf("%2d:%16.16qx %16.16qx ", i++, *p++, *p++);
+ db_printf("%2d:%16.16qx %16.16qx\n", i++, *p++, *p++);
#endif
}
} else {
@@ -374,10 +375,10 @@
while (count--) {
if (db_print_position() == 0) {
/* Always print the address. */
- db_printf("%016.16lx:\t", addr);
+ db_printf("%16.16lx:\t", addr);
}
oldaddr=addr;
- db_printf("%08.8lx\n", (long)ldxa(addr, ASI_PHYS_CACHED));
+ db_printf("%8.8lx\n", (long)ldxa(addr, ASI_PHYS_CACHED));
addr += 8;
if (db_print_position() != 0)
db_end_line();
@@ -409,11 +410,11 @@
data1 = ldxa((vaddr_t)&ptbl[j], ASI_PHYS_CACHED);
if (data0 || data1) {
db_printf("%llx: %llx\t",
- ((u_int64_t)i<<STSHIFT)|(k<<PDSHIFT)|((j-1)<<PTSHIFT),
- (u_long)(data0));
+ (unsigned long long)(((u_int64_t)i<<STSHIFT)|(k<<PDSHIFT)|((j-1)<<PTSHIFT)),
+ (unsigned long long)(data0));
db_printf("%llx: %llx\n",
- ((u_int64_t)i<<STSHIFT)|(k<<PDSHIFT)|(j<<PTSHIFT),
- (u_long)(data1));
+ (unsigned long long)(((u_int64_t)i<<STSHIFT)|(k<<PDSHIFT)|(j<<PTSHIFT)),
+ (unsigned long long)(data1));
}
}
}
@@ -446,22 +447,23 @@
db_printf("pmap_kernel(%p)->pm_segs[%lx][%lx][%lx]=>%qx\n",
(void *)addr, (u_long)va_to_seg(addr),
(u_long)va_to_dir(addr), (u_long)va_to_pte(addr),
- (u_quad_t)data);
+ (unsigned long long)data);
} else {
- db_printf("No mapping for %p\n", addr);
+ db_printf("No mapping for %p\n", (void *)addr);
}
return;
}
- db_printf("pmap_kernel(%p) psegs %p phys %p\n",
- kernel_pmap_, (long)kernel_pmap_.pm_segs, (long)kernel_pmap_.pm_physaddr);
+ db_printf("pmap_kernel(%p) psegs %p phys %llx\n",
+ &kernel_pmap_, kernel_pmap_.pm_segs,
+ (unsigned long long)kernel_pmap_.pm_physaddr);
if (full) {
db_dump_pmap(&kernel_pmap_);
} else {
for (j=i=0; i<STSZ; i++) {
long seg = (long)ldxa((vaddr_t)&kernel_pmap_.pm_segs[i], ASI_PHYS_CACHED);
if (seg)
- db_printf("seg %ld => %p%c", i, seg, (j++%4)?'\t':'\n');
+ db_printf("seg %d => %lx%c", i, seg, (j++%4)?'\t':'\n');
}
}
Home |
Main Index |
Thread Index |
Old Index