changeset 1932:508a2717c9f9

* src/sys/net/if.c (ifioctl): Fixed a compiler warning about types to printf. * src/sys/netinet/if_ether.c (in_arpinput): Ditto * src/sys/net/if.c: Ditto
author asl
date Sun, 27 Mar 2005 18:18:13 +0000
parents ae242bae5abc
children 7251145cdb9d
files packages/net/bsd_tcpip/current/ChangeLog packages/net/bsd_tcpip/current/src/ecos/support.c packages/net/bsd_tcpip/current/src/sys/net/if.c packages/net/bsd_tcpip/current/src/sys/netinet/if_ether.c
diffstat 4 files changed, 22 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/packages/net/bsd_tcpip/current/ChangeLog
+++ b/packages/net/bsd_tcpip/current/ChangeLog
@@ -1,3 +1,10 @@
+2005-03-27  Andrew Lunn  <andrew.lunn@ascom.ch>
+
+	* src/sys/net/if.c (ifioctl): Fixed a compiler warning about 
+	types to printf.
+	* src/sys/netinet/if_ether.c (in_arpinput): Ditto
+	* src/sys/net/if.c: Ditto
+
 2005-03-10	Matt Jerdonek	<maj1224@yahoo.com>
 
 	* cdl/freebsd_net.cdl:
--- a/packages/net/bsd_tcpip/current/src/ecos/support.c
+++ b/packages/net/bsd_tcpip/current/src/ecos/support.c
@@ -203,7 +203,7 @@ cyg_net_malloc(u_long size, int type, in
     void *res;
 
     START_STATS();
-    log(LOG_MDEBUG, "Net malloc[%d] = ", size);
+    log(LOG_MDEBUG, "Net malloc[%ld] = ", size);
     if (flags & M_NOWAIT) {
         res = cyg_mempool_var_try_alloc(net_mem, size);
     } else {
@@ -411,15 +411,15 @@ void cyg_kmem_print_stats( void )
     struct vm_zone *zone;
 
     diag_printf( "Network stack mbuf stats:\n" );
-    diag_printf( "   mbufs %d, clusters %d, free clusters %d\n",
+    diag_printf( "   mbufs %ld, clusters %ld, free clusters %ld\n",
                  mbstat.m_mbufs,	/* mbufs obtained from page pool */
                  mbstat.m_clusters,	/* clusters obtained from page pool */
                  /* mbstat.m_spare, */	/* spare field */
                  mbstat.m_clfree	/* free clusters */
         );
-    diag_printf( "   Failed to get %d times\n"
-                 "   Waited to get %d times\n"
-                 "   Drained queues to get %d times\n",
+    diag_printf( "   Failed to get %ld times\n"
+                 "   Waited to get %ld times\n"
+                 "   Drained queues to get %ld times\n",
                  mbstat.m_drops,	/* times failed to find space */
                  mbstat.m_wait, 	/* times waited for space */
                  mbstat.m_drain         /* times drained protocols for space */
@@ -558,7 +558,7 @@ void
 microtime(struct timeval *tp)
 {
     *tp = ktime;
-    log(LOG_DEBUG, "%s: = %d.%d\n", __FUNCTION__, tp->tv_sec, tp->tv_usec);
+    log(LOG_DEBUG, "%s: = %ld.%ld\n", __FUNCTION__, tp->tv_sec, tp->tv_usec);
     ktime.tv_usec++;  // In case clock isn't running yet
 }
 
@@ -566,7 +566,7 @@ void
 getmicrotime(struct timeval *tp)
 {
     *tp = ktime;
-    log(LOG_DEBUG, "%s: = %d.%d\n", __FUNCTION__, tp->tv_sec, tp->tv_usec);
+    log(LOG_DEBUG, "%s: = %ld.%ld\n", __FUNCTION__, tp->tv_sec, tp->tv_usec);
     ktime.tv_usec++;  // In case clock isn't running yet
 }
 
@@ -574,7 +574,7 @@ void
 getmicrouptime(struct timeval *tp)
 {
     *tp = ktime;
-    log(LOG_DEBUG, "%s: = %d.%d\n", __FUNCTION__, tp->tv_sec, tp->tv_usec);
+    log(LOG_DEBUG, "%s: = %ld.%ld\n", __FUNCTION__, tp->tv_sec, tp->tv_usec);
     ktime.tv_usec++;  // In case clock isn't running yet
 }
 
--- a/packages/net/bsd_tcpip/current/src/sys/net/if.c
+++ b/packages/net/bsd_tcpip/current/src/sys/net/if.c
@@ -1084,7 +1084,7 @@ char *
         _NAME(SIOCGIFSTATSUD);
         _NAME(SIOCGIFSTATS);
     default:
-        diag_sprintf(unknown, "0x%08x", cmd);
+        diag_sprintf(unknown, "0x%08lx", cmd);
         return unknown;
     }
 }
--- a/packages/net/bsd_tcpip/current/src/sys/netinet/if_ether.c
+++ b/packages/net/bsd_tcpip/current/src/sys/netinet/if_ether.c
@@ -480,8 +480,8 @@ arpintr()
 		if (ntohs(ar->ar_hrd) != ARPHRD_ETHER
 		    && ntohs(ar->ar_hrd) != ARPHRD_IEEE802) {
 			log(LOG_ERR,
-			    "arp: unknown hardware address format (0x%2D)\n",
-			    (unsigned char *)&ar->ar_hrd, "");
+			    "arp: unknown hardware address format (0x%d)\n",
+			    ntohs(ar->ar_hrd));
 			m_freem(m);
 			continue;
 		}
@@ -590,7 +590,7 @@ in_arpinput(m)
 	}
 	if (isaddr.s_addr == myaddr.s_addr) {
 		log(LOG_ERR,
-		   "arp: %6D is using my IP address %s!\n",
+		   "arp: %6p is using my IP address %s!\n",
 		   ea->arp_sha, inet_ntoa(isaddr));
 		itaddr = myaddr;
 		goto reply;
@@ -600,7 +600,7 @@ in_arpinput(m)
 		/* the following is not an error when doing bridging */
 		if (!BRIDGE_TEST && rt->rt_ifp != &ac->ac_if) {
 		    if (log_arp_wrong_iface)
-			log(LOG_ERR, "arp: %s is on %s%d but got reply from %6D on %s%d\n",
+			log(LOG_ERR, "arp: %s is on %s%d but got reply from %6p on %s%d\n",
 			    inet_ntoa(isaddr),
 			    rt->rt_ifp->if_name, rt->rt_ifp->if_unit,
 			    ea->arp_sha, 
@@ -610,13 +610,13 @@ in_arpinput(m)
 		if (sdl->sdl_alen &&
 		    bcmp((caddr_t)ea->arp_sha, LLADDR(sdl), sdl->sdl_alen)) {
 			if (rt->rt_expire)
-			    log(LOG_INFO, "arp: %s moved from %6D to %6D on %s%d\n",
+			    log(LOG_INFO, "arp: %s moved from %6p to %6p on %s%d\n",
 				inet_ntoa(isaddr), (u_char *)LLADDR(sdl),
 				ea->arp_sha,
 				ac->ac_if.if_name, ac->ac_if.if_unit);
 			else {
 			    log(LOG_ERR,
-				"arp: %6D attempts to modify permanent entry for %s on %s%d\n",
+				"arp: %6p attempts to modify permanent entry for %s on %s%d\n",
 				ea->arp_sha, inet_ntoa(isaddr),
 				ac->ac_if.if_name, ac->ac_if.if_unit);
 			    goto reply;