Hi,
Today I wanted to build kernel with the undefined DIAGNOSTIC option
(commented out) but I faced the issue that it will always fail because
of pms_print_packet function, which is used only once inside
DIAGNOSTIC defined block in sys/dev/pckbc/pms.c:953. Because of this
without this option, compilation error will occur:
pms.c:926:1: error : unused function. The problem is present in at
least current and 6.6 branch.
The quick fix is to add #ifdef DIAGNOSTIC around the function as well.
In this case, kernel builds fine.
--- a/sys/dev/pckbc/pms.c
+++ b/sys/dev/pckbc/pms.c
@@ -922,6 +922,7 @@ pms_sec_ioctl(void *v, u_long cmd, caddr_t data,
int flag, struct proc *p)
return (0);
}
+#ifdef DIAGNOSTIC
static inline void
pms_print_packet(struct pms_softc *sc)
{
@@ -932,6 +933,7 @@ pms_print_packet(struct pms_softc *sc)
for (i = 0; i < size; i++)
printf(i == state ? " %02x |" : " %02x", sc->packet[i]);
}
+#endif
Regards,
Andrius V