Subject: kern/6440: on Alpha, -DARP_DEBUG causes errors when building netboot
To: None <gnats-bugs@gnats.netbsd.org>
From: None <elric@imrryr.org>
List: netbsd-bugs
Date: 11/14/1998 04:18:23
>Number:         6440
>Category:       kern
>Synopsis:       on Alpha, -DARP_DEBUG causes errors when building netboot
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 14 04:20:01 1998
>Last-Modified:
>Originator:     R. C. Dowdeswell
>Organization:
Not much.
>Release:        Thu Nov 12 05:11:56 PST 1998
>Environment:
System: NetBSD mabelode.imrryr.org 1.3H NetBSD 1.3H (MABELODE) #2: Wed Nov 4 02:16:40 PST 1998 elric@mabelode.imrryr.org:/usr/src/sys/arch/alpha/compile/MABELODE alpha


>Description:
	When making the netboot'er with -DARP_DEBUG on the alpha, the build
	failed with "warning: int format, different type arg (arg 2)". 
>How-To-Repeat:

 # cd /sys/arch/alpha/stand/netboot
 # make

cc -Wall -Wno-main -mno-fp-regs -g  -Werror -Wall -Wno-main -I. -DPRIMARY_BOOTBLOCK -DALPHA_BOOT_ECOFF -DALPHA_BOOT_ELF -DARP_DEBUG -I/usr/src/sys/arch/alpha/stand/netboot -D_STANDALONE -I/usr/src/sys/arch/alpha/stand/netboot/../.. -I/usr/src/sys/arch/alpha/stand/netboot/../../../.. -DPRIMARY_LOAD_ADDRESS="0x20000000" -DSECONDARY_LOAD_ADDRESS="0x20004000" -DHEAP_LIMIT="0x20040000"   -DCOMPAT_UFS  -D__INTERNAL_LIBSA_CREAD -c /usr/src/sys/lib/libsa/arp.c
cc1: warnings being treated as errors
/usr/src/sys/lib/libsa/arp.c: In function `arprecv':
/usr/src/sys/lib/libsa/arp.c:214: warning: int format, different type arg (arg 2)
*** Error code 1

Stop.
*** Error code 1

Stop.

>Fix:
Well, this seemed to make it build...

*** arp.c.orig  Sat Nov 14 04:12:48 1998
--- arp.c       Sat Nov 14 04:12:55 1998
***************
*** 211,217 ****
        if (n == -1 || n < sizeof(struct ether_arp)) {
  #ifdef ARP_DEBUG
                if (debug)
!                       printf("bad len=%d\n", n);
  #endif
                return (-1);
        }
--- 211,217 ----
        if (n == -1 || n < sizeof(struct ether_arp)) {
  #ifdef ARP_DEBUG
                if (debug)
!                       printf("bad len=%ld\n", n);
  #endif
                return (-1);
        }

>Audit-Trail:
>Unformatted: