Ethereal-dev: [ethereal-dev] -Wall fixes for FreeBSD

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Bill Fumerola <billf@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 2 Aug 1999 12:14:32 -0400 (EDT)
Just some simple fixes to make the FreeBSD egcs happy, this commit
should be a no-brainer.

-- 
- bill fumerola - billf@xxxxxxxxxxxxxx - BF1560 - computer horizons corp -
- ph:(800) 252-2421 - bfumerol@xxxxxxxxxxxxxxxxxxxx - billf@xxxxxxxxxxx  -

--- packet-ipv6.c.bak	Mon Aug  2 07:27:45 1999
+++ packet-ipv6.c	Mon Aug  2 07:29:15 1999
@@ -136,13 +136,13 @@
 
     proto_tree_add_item(ipv6_tree,
 		offset + offsetof(struct ip6_hdr, ip6_flow), 4,
-		"Traffic class: 0x%02x", (ntohl(ipv6.ip6_flow) >> 20) & 0xff);
+		"Traffic class: 0x%02lx", (ntohl(ipv6.ip6_flow) >> 20) & 0xff);
 
     /* there should be no alignment problems for ip6_flow, since it's the first
     guint32 in the ipv6 struct */
     proto_tree_add_item(ipv6_tree,
 		offset + offsetof(struct ip6_hdr, ip6_flow), 4,
-		"Flowlabel: 0x%05x", ntohl(ipv6.ip6_flow & IPV6_FLOWLABEL_MASK));
+		"Flowlabel: 0x%05lx", ntohl(ipv6.ip6_flow & IPV6_FLOWLABEL_MASK));
 
     proto_tree_add_item(ipv6_tree,
 		offset + offsetof(struct ip6_hdr, ip6_plen), 2,
--- work/ethereal-0.6.3/packet-isakmp.c	Mon Jun 14 14:16:07 1999
+++ /tmp/packet-isakmp.c	Mon Aug  2 07:31:51 1999
@@ -1035,10 +1035,10 @@
     snprintf(numstr, NUMSTR_LEN, "%u", pntohs(pd));
     break;
   case 3:
-    snprintf(numstr, NUMSTR_LEN, "%lu", pntohl(pd) & 0x0fff);
+    snprintf(numstr, NUMSTR_LEN, "%lu", (u_long)(pntohl(pd) & 0x0fff));
     break;
   case 4:
-    snprintf(numstr, NUMSTR_LEN, "%lu", pntohl(pd));
+    snprintf(numstr, NUMSTR_LEN, "%lu", (u_long)pntohl(pd));
     break;
   default:
     snprintf(numstr, NUMSTR_LEN, "<too big>");