Subject: db_trace.c errors
To: None <port-pc532@netbsd.org>
From: Jon Buller <jon@bullers.net>
List: port-pc532
Date: 01/21/2002 22:14:15
I was compiling a new 1.5 kernel, and ran into this:
jon@bullbox$ cc -O2 -msb -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-format -Wno-uninitialized -Wno-main -I. -I../../../../arch -I../../../.. -nostdinc -DACCOUNTING -DLKM -DSHMMAXPGS="0x400" -DSETUIDSCRIPTS -DNS381 -DMAXUSERS=8 -D_KERNEL -c ../../../../arch/pc532/pc532/db_trace.c
../../../../arch/pc532/pc532/db_trace.c:80: warning: initialization from incompatible pointer type
../../../../arch/pc532/pc532/db_trace.c:81: warning: initialization from incompatible pointer type
The diff below fixes it, but I'm not sure what to do with that
(*pr)("error") thing. As a quick hack, I changed a parameter which
will have no effect, but get's past the error I get when I used
the statement 0; instead.
diff -r1.9 db_trace.c
56,57c56
< static int db_spec_regs __P((struct db_variable *, db_expr_t *, int,
< void (*)(const char *, ...)));
---
> static int db_spec_regs __P((struct db_variable *, db_expr_t *, int));
387c386
< db_spec_regs(vp, valp, what, pr)
---
> db_spec_regs(vp, valp, what)
391d389
< void (*pr) __P((const char *, ...));
451,452c449,451
< (*pr)("Internal error, unknown register in db_spec_regs");
< return(0);
---
> what = 0;
> /* (*pr)("Internal error, unknown register in db_spec_regs");
> */ return(0);
Is there some other way to get that ddb error printing function,
or a better way to handle the possible error than to ignore it?
I checked all the other ports, and the ones that treat registers
this way only have zero or one special registers, so they don't
bother with checking for a possible error like this.
I don't have the ability to put this in -current right now, but
think it should be pulled up on the 1.5 branch, especially if the
port gets orphaned. Anyone have any suggestions on that?
Jon