Subject: kern/30720: fdc_acpi.c compilation failure with ACPI_FDC_DEBUG
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <njoly@pasteur.fr>
List: netbsd-bugs
Date: 07/11/2005 10:13:00
>Number: 30720
>Category: kern
>Synopsis: fdc_acpi.c compilation failure with ACPI_FDC_DEBUG
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jul 11 10:13:00 +0000 2005
>Originator: Nicolas Joly
>Release: NetBSD 3.99.7
>Organization:
Institut Pasteur, Paris.
>Environment:
System: NetBSD lanfeust.sis.pasteur.fr 3.99.7 NetBSD 3.99.7 (LANFEUST) #24: Thu Jul 7 20:42:33 CEST 2005 njoly@lanfeust.sis.pasteur.fr:/local/src/NetBSD/obj/amd64/sys/arch/amd64/compile/LANFEUST amd64
Architecture: x86_64
Machine: amd64
>Description:
I just noticed a small compilation failure for ACPI kernels with
ACPI_FDC_DEBUG set:
# compile LANFEUST.ACPI/fdc_acpi.o
/local/src/NetBSD/tool/amd64/bin/x86_64--netbsd-gcc -mcmodel=kernel -mno-red-zone -ffreestanding -g -DACPI_FDC_DEBUG -O2 -fno-omit-frame-pointer -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-sign-compare -fno-zero-initialized-in-bss -Damd64 -Dx86_64 -I. -I/local/src/NetBSD/src/sys/arch -I/local/src/NetBSD/src/sys -nostdinc -DLKM -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -I/local/src/NetBSD/src/sys/dist/ipf -c /local/src/NetBSD/src/sys/dev/acpi/fdc_acpi.c
/local/src/NetBSD/src/sys/dev/acpi/fdc_acpi.c: In function `fdc_acpi_enumerate':
/local/src/NetBSD/src/sys/dev/acpi/fdc_acpi.c:245: warning: format argument is not a pointer (arg 3)
/local/src/NetBSD/src/sys/dev/acpi/fdc_acpi.c:245: warning: too many arguments for format
>How-To-Repeat:
Try to compile a kernel with ACPI+ACPI_FDC_DEBUG.
>Fix:
Index: sys/dev/acpi/fdc_acpi.c
===================================================================
RCS file: /cvsroot/src/sys/dev/acpi/fdc_acpi.c,v
retrieving revision 1.24
diff -u -r1.24 fdc_acpi.c
--- sys/dev/acpi/fdc_acpi.c 29 May 2005 20:56:02 -0000 1.24
+++ sys/dev/acpi/fdc_acpi.c 11 Jul 2005 09:19:15 -0000
@@ -242,7 +242,7 @@
if (ACPI_FAILURE(rv)) {
#ifdef ACPI_FDC_DEBUG
printf("%s: failed to evaluate _FDE: %s\n",
- sc->sc_dev.dv_xname, rv, AcpiFormatException(rv));
+ sc->sc_dev.dv_xname, AcpiFormatException(rv));
#endif
return drives;
}