aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--capture-wpcap.c4
-rw-r--r--capture.c8
-rw-r--r--packet-atalk.c8
-rw-r--r--packet-bgp.c4
-rw-r--r--packet-cops.c4
-rw-r--r--packet-dns.c6
-rw-r--r--packet-gtp.c4
-rw-r--r--packet-nbns.c10
-rw-r--r--packet-ospf.c6
-rw-r--r--packet-smb-common.c6
-rw-r--r--packet-vines.c4
-rw-r--r--plugins/artnet/packet-artnet.c10
-rw-r--r--plugins/docsis/packet-rngrsp.c4
-rw-r--r--plugins/giop/packet-coseventcomm.c2
-rw-r--r--plugins/giop/packet-cosnaming.c2
-rw-r--r--plugins/gryphon/packet-gryphon.c4
-rw-r--r--prefs.c8
-rw-r--r--tethereal.c4
-rw-r--r--text2pcap.c8
19 files changed, 54 insertions, 52 deletions
diff --git a/capture-wpcap.c b/capture-wpcap.c
index ac43078d73..618dd58747 100644
--- a/capture-wpcap.c
+++ b/capture-wpcap.c
@@ -3,7 +3,7 @@
* time, so that we only need one Ethereal binary and one Tethereal binary
* for Windows, regardless of whether WinPcap is installed or not.
*
- * $Id: capture-wpcap.c,v 1.7 2003/12/21 12:18:59 ulfl Exp $
+ * $Id: capture-wpcap.c,v 1.8 2004/01/05 19:31:42 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -348,7 +348,7 @@ get_interface_list(int *err, char *err_str)
j = 0;
while (names[i] != 0) {
if (j < MAX_WIN_IF_NAME_LEN)
- ascii_name[j++] = names[i++];
+ ascii_name[j++] = (char) names[i++];
}
ascii_name[j] = '\0';
i++;
diff --git a/capture.c b/capture.c
index 9f4260738d..47ac667b2b 100644
--- a/capture.c
+++ b/capture.c
@@ -1,7 +1,7 @@
/* capture.c
* Routines for packet capture windows
*
- * $Id: capture.c,v 1.220 2003/12/21 12:18:59 ulfl Exp $
+ * $Id: capture.c,v 1.221 2004/01/05 19:31:43 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -348,7 +348,9 @@ do_capture(const char *save_file)
char sautostop_filesize[24]; /* need a constant for len of numbers */
char sautostop_duration[24]; /* need a constant for len of numbers */
char save_file_fd[24];
+#ifndef _WIN32
char errmsg[1024+1];
+#endif
int error;
int argc;
char **argv;
@@ -1395,14 +1397,14 @@ capture(gboolean *stats_known, struct pcap_stat *stats)
char errmsg[4096+1];
gboolean write_ok;
gboolean close_ok;
- fd_set set1;
- struct timeval timeout;
capture_info capture_ui;
#ifdef _WIN32
WORD wVersionRequested;
WSADATA wsaData;
#else
+ fd_set set1;
+ struct timeval timeout;
static const char ppamsg[] = "can't find PPA for ";
char *libpcap_warn;
int sel_ret;
diff --git a/packet-atalk.c b/packet-atalk.c
index 6ede79e757..e6fbc9afba 100644
--- a/packet-atalk.c
+++ b/packet-atalk.c
@@ -2,7 +2,7 @@
* Routines for AppleTalk packet disassembly: LLAP, DDP, NBP, ATP, ASP,
* RTMP.
*
- * $Id: packet-atalk.c,v 1.91 2003/11/16 23:17:16 guy Exp $
+ * $Id: packet-atalk.c,v 1.92 2004/01/05 19:31:43 ulfl Exp $
*
* Simon Wilkinson <sxw@dcs.ed.ac.uk>
*
@@ -1089,7 +1089,7 @@ dissect_asp_reply_get_status(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
}
if (utf_ofs) {
ofs = utf_ofs;
- len = tvb_get_ntohs(tvb, ofs);
+ len = (guint8) tvb_get_ntohs(tvb, ofs);
proto_tree_add_item(tree, hf_asp_server_utf8_name_len, tvb, ofs, 2, FALSE);
ofs += 2;
proto_tree_add_item(tree, hf_asp_server_utf8_name, tvb, ofs, len, FALSE);
@@ -1165,7 +1165,7 @@ dissect_asp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (!aspinfo)
return;
- fn = aspinfo->command;
+ fn = (guint8) aspinfo->command;
if (check_col(pinfo->cinfo, COL_INFO)) {
if (aspinfo->reply)
@@ -1313,7 +1313,7 @@ dissect_atp_zip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (!aspinfo)
return;
- fn = aspinfo->command;
+ fn = (guint8) aspinfo->command;
if (check_col(pinfo->cinfo, COL_INFO)) {
if (aspinfo->reply)
diff --git a/packet-bgp.c b/packet-bgp.c
index fc4be86a99..478cfc3b81 100644
--- a/packet-bgp.c
+++ b/packet-bgp.c
@@ -2,7 +2,7 @@
* Routines for BGP packet dissection.
* Copyright 1999, Jun-ichiro itojun Hagino <itojun@itojun.org>
*
- * $Id: packet-bgp.c,v 1.82 2003/06/03 23:49:59 guy Exp $
+ * $Id: packet-bgp.c,v 1.83 2004/01/05 19:31:43 ulfl Exp $
*
* Supports:
* RFC1771 A Border Gateway Protocol 4 (BGP-4)
@@ -896,7 +896,7 @@ decode_prefix_MP(proto_tree *tree, int hf_addr4, int hf_addr6,
case SAFNUM_LAB_VPNUNICAST:
case SAFNUM_LAB_VPNMULCAST:
case SAFNUM_LAB_VPNUNIMULC:
- plen = tvb_get_ntohs(tvb,offset);
+ plen = (guint8) tvb_get_ntohs(tvb,offset);
rd_type=tvb_get_ntohs(tvb,offset+2);
ce_id=tvb_get_ntohs(tvb,offset+10);
labblk_off=tvb_get_ntohs(tvb,offset+12);
diff --git a/packet-cops.c b/packet-cops.c
index 2e6c515821..df10ba1c22 100644
--- a/packet-cops.c
+++ b/packet-cops.c
@@ -4,7 +4,7 @@
*
* Copyright 2000, Heikki Vatiainen <hessu@cs.tut.fi>
*
- * $Id: packet-cops.c,v 1.39 2003/12/21 05:51:32 jmayer Exp $
+ * $Id: packet-cops.c,v 1.40 2004/01/05 19:31:43 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -920,7 +920,7 @@ static guchar*format_asn_value (struct variable_list *variable, subid_t *variabl
subtree = get_tree(variable_oid,variable_oid_length, subtree);
if (subtree->type == 0)
- variable->type=type_from_packet;
+ variable->type= (guint8)type_from_packet;
buf_len = SPRINT_MAX_LEN; /*defined in NET-SNMP's snmp-impl.h*/
buf = g_malloc(buf_len);
diff --git a/packet-dns.c b/packet-dns.c
index f90159ed24..c62d1a544a 100644
--- a/packet-dns.c
+++ b/packet-dns.c
@@ -1,7 +1,7 @@
/* packet-dns.c
* Routines for DNS packet disassembly
*
- * $Id: packet-dns.c,v 1.116 2003/12/19 23:13:42 guy Exp $
+ * $Id: packet-dns.c,v 1.117 2004/01/05 19:31:43 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -2145,8 +2145,8 @@ dissect_dns_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* To do: check for errs, etc. */
id = tvb_get_ntohs(tvb, offset + DNS_ID);
flags = tvb_get_ntohs(tvb, offset + DNS_FLAGS);
- opcode = (flags & F_OPCODE) >> OPCODE_SHIFT;
- rcode = (flags & F_RCODE);
+ opcode = (guint16) ((flags & F_OPCODE) >> OPCODE_SHIFT);
+ rcode = (guint16) (flags & F_RCODE);
if (check_col(pinfo->cinfo, COL_INFO)) {
strcpy(buf, val_to_str(opcode, opcode_vals, "Unknown operation (%u)"));
diff --git a/packet-gtp.c b/packet-gtp.c
index e7d8b891ec..9193adda62 100644
--- a/packet-gtp.c
+++ b/packet-gtp.c
@@ -4,7 +4,7 @@
* Copyright 2001, Michal Melerowicz <michal.melerowicz@nokia.com>
* Nicolas Balkota <balkota@mac.com>
*
- * $Id: packet-gtp.c,v 1.69 2003/11/29 03:55:31 guy Exp $
+ * $Id: packet-gtp.c,v 1.70 2004/01/05 19:31:43 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -3124,7 +3124,7 @@ decode_qos_umts(tvbuff_t *tvb, int offset, proto_tree *tree, gchar* qos_str, gui
retval = length + 1;
break;
case 2:
- length = tvb_get_ntohs (tvb, offset + 1);
+ length = (guint8) tvb_get_ntohs (tvb, offset + 1);
te = proto_tree_add_text(tree, tvb, offset, length + 3, "%s", qos_str);
ext_tree_qos = proto_item_add_subtree (te, ett_gtp_qos);
proto_tree_add_text (ext_tree_qos, tvb, offset + 1, 2, "Length: %u", length);
diff --git a/packet-nbns.c b/packet-nbns.c
index 827d88183f..6c624fd74e 100644
--- a/packet-nbns.c
+++ b/packet-nbns.c
@@ -3,7 +3,7 @@
* to when it had only NBNS)
* Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-nbns.c,v 1.80 2002/09/12 00:10:58 tpot Exp $
+ * $Id: packet-nbns.c,v 1.81 2004/01/05 19:31:44 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -432,7 +432,7 @@ nbns_add_nbns_flags(column_info *cinfo, proto_tree *nbns_tree, tvbuff_t *tvb, in
proto_tree *field_tree;
proto_item *tf;
- opcode = (flags & F_OPCODE) >> OPCODE_SHIFT;
+ opcode = (guint16) ((flags & F_OPCODE) >> OPCODE_SHIFT);
strcpy(buf, val_to_str(opcode, opcode_vals, "Unknown operation"));
if (flags & F_RESPONSE && !is_wack) {
strcat(buf, " response");
@@ -1007,8 +1007,8 @@ dissect_nbns(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* To do: check for runts, errs, etc. */
id = tvb_get_ntohs(tvb, offset + NBNS_ID);
flags = tvb_get_ntohs(tvb, offset + NBNS_FLAGS);
- opcode = (flags & F_OPCODE) >> OPCODE_SHIFT;
- rcode = (flags & F_RCODE);
+ opcode = (guint16) ((flags & F_OPCODE) >> OPCODE_SHIFT);
+ rcode = (guint16) (flags & F_RCODE);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "%s%s",
@@ -1197,7 +1197,7 @@ dissect_nbdgm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
case NBDS_ERROR:
- header.error_code = tvb_get_ntohs(tvb, offset+10);
+ header.error_code = (guint8) tvb_get_ntohs(tvb, offset+10);
break;
}
diff --git a/packet-ospf.c b/packet-ospf.c
index e931c88d1f..5637ba7779 100644
--- a/packet-ospf.c
+++ b/packet-ospf.c
@@ -2,7 +2,7 @@
* Routines for OSPF packet disassembly
* (c) Copyright Hannes R. Boehm <hannes@boehm.org>
*
- * $Id: packet-ospf.c,v 1.78 2003/12/21 04:31:56 jmayer Exp $
+ * $Id: packet-ospf.c,v 1.79 2004/01/05 19:31:44 ulfl Exp $
*
* At this time, this module is able to analyze OSPF
* packets as specified in RFC2328. MOSPF (RFC1584) and other
@@ -819,7 +819,7 @@ dissect_ospf_ls_req(tvbuff_t *tvb, int offset, proto_tree *tree, guint8 version)
tvb, offset, 4, FALSE);
break;
case OSPF_VERSION_3:
- reserved = tvb_get_ntohs(tvb, offset);
+ reserved = (guint8) tvb_get_ntohs(tvb, offset);
proto_tree_add_text(ospf_lsr_tree, tvb, offset, 2,
(reserved == 0 ? "Reserved: %u" : "Reserved: %u (incorrect, should be 0)"), reserved);
ls_type = tvb_get_ntohs(tvb, offset+2);
@@ -1270,7 +1270,7 @@ dissect_ospf_v2_lsa(tvbuff_t *tvb, int offset, proto_tree *tree,
/* again: flags should be secified in detail */
proto_tree_add_text(ospf_lsa_tree, tvb, offset, 1, "Flags: 0x%02x",
tvb_get_guint8(tvb, offset));
- nr_links = tvb_get_ntohs(tvb, offset + 2);
+ nr_links = (guint8) tvb_get_ntohs(tvb, offset + 2);
proto_tree_add_text(ospf_lsa_tree, tvb, offset + 2, 2, "Number of Links: %u",
nr_links);
offset += 4;
diff --git a/packet-smb-common.c b/packet-smb-common.c
index 153e807210..3ed2710409 100644
--- a/packet-smb-common.c
+++ b/packet-smb-common.c
@@ -2,7 +2,7 @@
* Common routines for smb packet dissection
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
- * $Id: packet-smb-common.c,v 1.18 2003/06/12 08:33:30 guy Exp $
+ * $Id: packet-smb-common.c,v 1.19 2004/01/05 19:31:44 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -104,7 +104,7 @@ int display_unicode_string(tvbuff_t *tvb, proto_tree *tree, int offset, int hf_i
charoffset = offset;
p = str;
while ((character = tvb_get_letohs(tvb, charoffset)) != '\0') {
- *p++ = character;
+ *p++ = (char) character;
charoffset += 2;
}
*p = '\0';
@@ -169,7 +169,7 @@ unicode_to_str(tvbuff_t *tvb, int offset, int *us_lenp, gboolean exactlen,
}
if (len > 0) {
if ((uchar & 0xFF00) == 0)
- *p++ = uchar; /* ISO 8859-1 */
+ *p++ = (gchar) uchar; /* ISO 8859-1 */
else
*p++ = '?'; /* not 8859-1 */
len--;
diff --git a/packet-vines.c b/packet-vines.c
index d8c7e03d53..4562990082 100644
--- a/packet-vines.c
+++ b/packet-vines.c
@@ -1,7 +1,7 @@
/* packet-vines.c
* Routines for Banyan VINES protocol packet disassembly
*
- * $Id: packet-vines.c,v 1.61 2004/01/01 21:35:49 guy Exp $
+ * $Id: packet-vines.c,v 1.62 2004/01/05 19:31:44 ulfl Exp $
*
* Don Lafontaine <lafont02@cn.ca>
*
@@ -939,7 +939,7 @@ dissect_vines_arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/*
* Non-sequenced ARP.
*/
- packet_type = tvb_get_ntohs(tvb, 0);
+ packet_type = (guint8) tvb_get_ntohs(tvb, 0);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_str(pinfo->cinfo, COL_INFO,
val_to_str(packet_type, vines_arp_packet_type_vals,
diff --git a/plugins/artnet/packet-artnet.c b/plugins/artnet/packet-artnet.c
index ec4fcdf223..cde3cd8bd2 100644
--- a/plugins/artnet/packet-artnet.c
+++ b/plugins/artnet/packet-artnet.c
@@ -1,7 +1,7 @@
/* packet-artnet.c
* Routines for Art-Net packet disassembly
*
- * $Id: packet-artnet.c,v 1.5 2003/11/17 20:57:11 guy Exp $
+ * $Id: packet-artnet.c,v 1.6 2004/01/05 19:28:54 ulfl Exp $
*
* Copyright (c) 2003 by Erwin Rol <erwin@erwinrol.com>
*
@@ -997,22 +997,22 @@ dissect_artnet_video_data(tvbuff_t *tvb, guint offset, proto_tree *tree) {
offset, 2, FALSE);
offset += 2;
- pos_x = tvb_get_ntohs(tvb, offset);
+ pos_x = (guint8) tvb_get_ntohs(tvb, offset);
proto_tree_add_uint(tree, hf_artnet_video_data_pos_x, tvb,
offset, 1, pos_x);
offset += 1;
- pos_y = tvb_get_ntohs(tvb, offset);
+ pos_y = (guint8) tvb_get_ntohs(tvb, offset);
proto_tree_add_uint(tree, hf_artnet_video_data_pos_y, tvb,
offset, 1, pos_y);
offset += 1;
- len_x = tvb_get_ntohs(tvb, offset);
+ len_x = (guint8) tvb_get_ntohs(tvb, offset);
proto_tree_add_uint(tree, hf_artnet_video_data_len_x, tvb,
offset, 1, len_x);
offset += 1;
- len_y = tvb_get_ntohs(tvb, offset);
+ len_y = (guint8) tvb_get_ntohs(tvb, offset);
proto_tree_add_uint(tree, hf_artnet_video_data_len_y, tvb,
offset, 1, len_y);
offset += 1;
diff --git a/plugins/docsis/packet-rngrsp.c b/plugins/docsis/packet-rngrsp.c
index 24dbb53f67..d066d45ff4 100644
--- a/plugins/docsis/packet-rngrsp.c
+++ b/plugins/docsis/packet-rngrsp.c
@@ -2,7 +2,7 @@
* Routines for Ranging Response Message dissection
* Copyright 2002, Anand V. Narwani <anand[AT]narwani.org>
*
- * $Id: packet-rngrsp.c,v 1.6 2003/12/13 03:18:38 guy Exp $
+ * $Id: packet-rngrsp.c,v 1.7 2004/01/05 19:28:34 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -86,7 +86,7 @@ byte_to_signed (guint8 i)
{
val = i;
}
- return (val);
+ return (gint8) (val);
}
gint16
diff --git a/plugins/giop/packet-coseventcomm.c b/plugins/giop/packet-coseventcomm.c
index fc41bfab5e..5b098ab1fc 100644
--- a/plugins/giop/packet-coseventcomm.c
+++ b/plugins/giop/packet-coseventcomm.c
@@ -152,7 +152,7 @@ static const char CosEventComm_PullConsumer_disconnect_pull_consumer_op[] = "dis
static gboolean decode_user_exception(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int *offset _U_, MessageHeader *header _U_, gchar *operation _U_ ) {
- gboolean be _U_; /* big endianess */
+ /*gboolean be _U_;*/ /* big endianess */
diff --git a/plugins/giop/packet-cosnaming.c b/plugins/giop/packet-cosnaming.c
index b8e90e935f..43f6c15cd3 100644
--- a/plugins/giop/packet-cosnaming.c
+++ b/plugins/giop/packet-cosnaming.c
@@ -289,7 +289,7 @@ static void decode_ex_CosNaming_NamingContext_CannotProceed(tvbuff_t *tvb _U_, p
static gboolean decode_user_exception(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int *offset _U_, MessageHeader *header _U_, gchar *operation _U_ ) {
- gboolean be _U_; /* big endianess */
+ /*gboolean be _U_;*/ /* big endianess */
diff --git a/plugins/gryphon/packet-gryphon.c b/plugins/gryphon/packet-gryphon.c
index 785079d696..9ea1d83786 100644
--- a/plugins/gryphon/packet-gryphon.c
+++ b/plugins/gryphon/packet-gryphon.c
@@ -3,7 +3,7 @@
* By Steve Limkemann <stevelim@dgtech.com>
* Copyright 1998 Steve Limkemann
*
- * $Id: packet-gryphon.c,v 1.43 2003/11/04 18:37:32 guy Exp $
+ * $Id: packet-gryphon.c,v 1.44 2004/01/05 19:27:50 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -919,7 +919,7 @@ resp_time(tvbuff_t *tvb, int offset, proto_tree *pt)
*/
ts.lng[1] = tvb_get_ntohl(tvb, offset);
ts.lng[0] = tvb_get_ntohl(tvb, offset + 4);
- timestamp = ts.lnglng / 100000L;
+ timestamp = (time_t) (ts.lnglng / 100000L);
strncpy (date, ctime(&timestamp), sizeof(date));
date[strlen(date)-1] = 0x00;
proto_tree_add_text(pt, tvb, offset, 8, "Date/Time: %s", date);
diff --git a/prefs.c b/prefs.c
index baaf7754d7..11a5417466 100644
--- a/prefs.c
+++ b/prefs.c
@@ -1,7 +1,7 @@
/* prefs.c
* Routines for handling preferences
*
- * $Id: prefs.c,v 1.119 2003/12/31 09:58:56 guy Exp $
+ * $Id: prefs.c,v 1.120 2004/01/05 19:31:44 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1311,9 +1311,9 @@ prefs_set_pref(char *prefarg)
#define PRS_CAP_REAL_TIME "capture.real_time_update"
#define PRS_CAP_AUTO_SCROLL "capture.auto_scroll"
-#define RED_COMPONENT(x) ((((x) >> 16) & 0xff) * 65535 / 255)
-#define GREEN_COMPONENT(x) ((((x) >> 8) & 0xff) * 65535 / 255)
-#define BLUE_COMPONENT(x) (((x) & 0xff) * 65535 / 255)
+#define RED_COMPONENT(x) (guint16) (((((x) >> 16) & 0xff) * 65535 / 255))
+#define GREEN_COMPONENT(x) (guint16) (((((x) >> 8) & 0xff) * 65535 / 255))
+#define BLUE_COMPONENT(x) (guint16) ( (((x) & 0xff) * 65535 / 255))
static gchar *pr_formats[] = { "text", "postscript" };
static gchar *pr_dests[] = { "command", "file" };
diff --git a/tethereal.c b/tethereal.c
index 04280099ba..d271cb3080 100644
--- a/tethereal.c
+++ b/tethereal.c
@@ -1,6 +1,6 @@
/* tethereal.c
*
- * $Id: tethereal.c,v 1.213 2004/01/03 18:40:07 sharpe Exp $
+ * $Id: tethereal.c,v 1.214 2004/01/05 19:31:44 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1598,7 +1598,6 @@ capture(int out_file_type)
bpf_u_int32 netnum, netmask;
struct bpf_program fcode;
const char *set_linktype_err_str;
- void (*oldhandler)(int);
int err = 0;
int volatile volatile_err = 0;
int volatile inpkts = 0;
@@ -1607,6 +1606,7 @@ capture(int out_file_type)
condition *volatile cnd_stop_capturesize = NULL;
condition *volatile cnd_stop_timeout = NULL;
#ifndef _WIN32
+ void (*oldhandler)(int);
static const char ppamsg[] = "can't find PPA for ";
char *libpcap_warn;
volatile int pipe_fd = -1;
diff --git a/text2pcap.c b/text2pcap.c
index 14deeccd85..b7cb2cef77 100644
--- a/text2pcap.c
+++ b/text2pcap.c
@@ -6,7 +6,7 @@
*
* (c) Copyright 2001 Ashok Narayanan <ashokn@cisco.com>
*
- * $Id: text2pcap.c,v 1.27 2003/12/21 04:31:57 jmayer Exp $
+ * $Id: text2pcap.c,v 1.28 2004/01/05 19:31:44 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -352,7 +352,7 @@ write_byte (char *str)
unsigned long num;
num = parse_num(str, FALSE);
- packet_buf[curr_offset] = num;
+ packet_buf[curr_offset] = (unsigned char) num;
curr_offset ++;
if (curr_offset >= max_offset) /* packet full */
start_new_packet();
@@ -558,7 +558,7 @@ write_current_packet (void)
/* Write IP header */
if (hdr_ip) {
HDR_IP.packet_length = g_htons(ip_length);
- HDR_IP.protocol = hdr_ip_proto;
+ HDR_IP.protocol = (guint8) hdr_ip_proto;
HDR_IP.hdr_checksum = 0;
HDR_IP.hdr_checksum = in_checksum(&HDR_IP, sizeof(HDR_IP));
fwrite(&HDR_IP, sizeof(HDR_IP), 1, output_file);
@@ -568,7 +568,7 @@ write_current_packet (void)
pseudoh.src_addr = HDR_IP.src_addr;
pseudoh.dest_addr = HDR_IP.dest_addr;
pseudoh.zero = 0;
- pseudoh.protocol = hdr_ip_proto;
+ pseudoh.protocol = (guint8) hdr_ip_proto;
pseudoh.length = g_htons(proto_length);
/* Write UDP header */