GCC 3.1 whines about these two instances of va_arg() and generates
code which calls "int 5" if they are executed.

This workaround works for me, but I don't know if this is the
correct fix so I won't commit it.

In light of this, we may want to change the kernels panic message
for these traps to be more informative.

Poul-Henning

Index: bios.c
===================================================================
RCS file: /home/ncvs/src/sys/i386/i386/bios.c,v
retrieving revision 1.52
diff -u -r1.52 bios.c
--- bios.c      17 Apr 2002 13:06:35 -0000      1.52
+++ bios.c      13 May 2002 13:53:27 -0000
@@ -363,7 +363,11 @@
            break;
            
        case 's':                       /* 16-bit integer */
+#if 0
            i = va_arg(ap, u_short);
+#else
+           i = va_arg(ap, u_int);
+#endif
            stack -= 2;
            break;
 
@@ -435,7 +439,11 @@
            break;
 
        case 's':                       /* 16-bit integer */
+#if 0
            i = va_arg(ap, u_short);
+#else
+           i = va_arg(ap, u_int);
+#endif
            *(u_short *)stack = i;
            stack += 2;
            break;

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED]         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to