On Sat, Aug 09, 2014 at 03:37:03PM +0200, �yvind Vågen JÊgtnes wrote:
> The FAQ says not to report build errors, however this is not a development
> snapshot but the openbsd 5.5 release source with erratas applied.
>
> If this is fixed in a development snapshot then I am sorry for the
> disturbance.
>
>
> In:
> /usr/src/sys/arch/amd64/amd64/machdep.c: line 1862
>
> The following code block generates the build error (warnings not allowed)
> The variable cdp is set no matter what the config options are.
>
> cdp is only referenced if you build with com ports or BOOTINFO_DEBUG
>
> Without com ports enabled in the kernel config or BOOTINFO_DEBUG the build
> will fail with a warning.
Snapshots and releases all use GENERIC/RAMDISK kernels so this isn't
a problem there, as they all have com.
I guess we either go with a change like the below or just
move all of the BOOTARG_CONSDEV case under NCOM > 0.
Index: amd64/amd64/machdep.c
===================================================================
RCS file: /cvs/src/sys/arch/amd64/amd64/machdep.c,v
retrieving revision 1.189
diff -u -p -r1.189 machdep.c
--- amd64/amd64/machdep.c 21 Jul 2014 17:25:47 -0000 1.189
+++ amd64/amd64/machdep.c 9 Aug 2014 14:04:10 -0000
@@ -1853,8 +1853,10 @@ getbootinfo(char *bootinfo, int bootinfo
case BOOTARG_CONSDEV:
if (q->ba_size >= sizeof(bios_consdev_t) +
offsetof(struct _boot_args32, ba_arg)) {
+#if NCOM > 0 || defined(BOOTINFO_DEBUG)
bios_consdev_t *cdp =
(bios_consdev_t*)q->ba_arg;
+#endif
#if NCOM > 0
static const int ports[] =
{ 0x3f8, 0x2f8, 0x3e8, 0x2e8 };
Index: i386/i386/bios.c
===================================================================
RCS file: /cvs/src/sys/arch/i386/i386/bios.c,v
retrieving revision 1.104
diff -u -p -r1.104 bios.c
--- i386/i386/bios.c 29 Mar 2014 18:09:29 -0000 1.104
+++ i386/i386/bios.c 9 Aug 2014 13:54:58 -0000
@@ -549,8 +549,10 @@ bios_getopt()
case BOOTARG_CONSDEV:
if (q->ba_size >= sizeof(bios_consdev_t) +
offsetof(bootarg_t, ba_arg)) {
+#if NCOM > 0 || defined(BIOS_DEBUG)
bios_consdev_t *cdp =
(bios_consdev_t*)q->ba_arg;
+#endif
#if NCOM > 0
static const int ports[] =
{ 0x3f8, 0x2f8, 0x3e8, 0x2e8 };