diff options
-rw-r--r-- | epan/dissectors/packet-dcerpc-nt.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-sccp.c | 8 | ||||
-rw-r--r-- | epan/dissectors/packet-sctp.c | 2 | ||||
-rw-r--r-- | wiretap/5views.c | 26 | ||||
-rw-r--r-- | wiretap/iseries.c | 15 | ||||
-rw-r--r-- | wiretap/wtap-int.h | 2 |
6 files changed, 30 insertions, 27 deletions
diff --git a/epan/dissectors/packet-dcerpc-nt.c b/epan/dissectors/packet-dcerpc-nt.c index 15f3a0149d..aca9a95822 100644 --- a/epan/dissectors/packet-dcerpc-nt.c +++ b/epan/dissectors/packet-dcerpc-nt.c @@ -1180,7 +1180,7 @@ void cb_str_postprocess(packet_info *pinfo, proto_tree *tree _U_, { gint options = GPOINTER_TO_INT(callback_args); gint levels = CB_STR_ITEM_LEVELS(options); - char *s; + guint8 *s; /* Align start_offset on 4-byte boundary. */ @@ -1516,8 +1516,6 @@ dissect_LOGON_HOURS_hours(tvbuff_t *tvb, int offset, proto_item_set_len(item, offset-old_offset); return offset; - - return offset; } static gint ett_nt_logon_hours = -1; diff --git a/epan/dissectors/packet-sccp.c b/epan/dissectors/packet-sccp.c index c364aee6af..9ab5e4d7dc 100644 --- a/epan/dissectors/packet-sccp.c +++ b/epan/dissectors/packet-sccp.c @@ -1029,7 +1029,7 @@ dissect_sccp_gt_address_information(tvbuff_t *tvb, proto_tree *tree, if (is_connectionless(message_type) && sccp_msg) { guint8** gt_ptr = called ? &(sccp_msg->data.ud.called_gt) : &(sccp_msg->data.ud.calling_gt); - *gt_ptr = ep_strdup(gt_digits); + *gt_ptr = (guint8 *)ep_strdup(gt_digits); } digits_item = proto_tree_add_string_format(tree, @@ -1209,7 +1209,7 @@ dissect_sccp_called_calling_param(tvbuff_t *tvb, proto_tree *tree, proto_item *call_item = 0, *call_ai_item = 0, *item; proto_tree *call_tree = 0, *call_ai_tree = 0; guint offset; - guint8 national = -1, routing_ind, gti, pci, ssni, ssn; + guint8 national = 0xFFU, routing_ind, gti, pci, ssni, ssn; tvbuff_t *gt_tvb; dissector_handle_t ssn_dissector = NULL, tcap_ssn_dissector = NULL; const char *ssn_dissector_short_name = NULL; @@ -2639,6 +2639,10 @@ dissect_sccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * An example is A-interface traffic having ANSI MTP3/ANSI SCCP/3GPP2 IOS * and at the same time ITU MTP3/ITU SCCP/ANSI TCAP/ANSI MAP. */ + /** XX: mtp3_addr-p->type is an mtp3_net_addr_fmt_e enum **/ + /** decode_mtp3_standard is a STANDARD_TYPE enum **/ + /** Is the following OK ?? **/ + /** (The Sun C compiler says 'enum type mismatch') **/ decode_mtp3_standard = mtp3_addr_p->type; } else diff --git a/epan/dissectors/packet-sctp.c b/epan/dissectors/packet-sctp.c index a72269ed2e..533f9d51ce 100644 --- a/epan/dissectors/packet-sctp.c +++ b/epan/dissectors/packet-sctp.c @@ -504,7 +504,7 @@ static guint32 sctp_crc32c(const unsigned char* buf, unsigned int len) { unsigned int i; - guint32 crc32 = ~0L; + guint32 crc32 = ~0U; guint32 result; unsigned char byte0,byte1,byte2,byte3; diff --git a/wiretap/5views.c b/wiretap/5views.c index edfb7b5c13..198b52e715 100644 --- a/wiretap/5views.c +++ b/wiretap/5views.c @@ -51,27 +51,27 @@ typedef struct }t_5VW_Attributes_Header; -#define CST_5VW_INFO_HEADER_KEY 0xAAAAAAAA /* signature */ +#define CST_5VW_INFO_HEADER_KEY 0xAAAAAAAAU /* signature */ -#define CST_5VW_INFO_RECORD_VERSION 0x00010000 /* version */ +#define CST_5VW_INFO_RECORD_VERSION 0x00010000U /* version */ #define CST_5VW_DECALE_FILE_TYPE 24 -#define CST_5VW_SECTION_CAPTURES 0x08 +#define CST_5VW_SECTION_CAPTURES 0x08U #define CST_5VW_CAPTURES_FILE (CST_5VW_SECTION_CAPTURES << CST_5VW_DECALE_FILE_TYPE) /* 0x08000000 */ -#define CST_5VW_FLAT_FILE 0x10000000 +#define CST_5VW_FLAT_FILE 0x10000000U #define CST_5VW_CAPTURE_FILEID (CST_5VW_FLAT_FILE | CST_5VW_CAPTURES_FILE) -#define CST_5VW_FAMILY_CAP_ETH 0x01 -#define CST_5VW_FAMILY_CAP_WAN 0x02 +#define CST_5VW_FAMILY_CAP_ETH 0x01U +#define CST_5VW_FAMILY_CAP_WAN 0x02U #define CST_5VW_DECALE_FILE_FAMILY 12 #define CST_5VW_CAP_ETH (CST_5VW_FAMILY_CAP_ETH << CST_5VW_DECALE_FILE_FAMILY) /* 0x00001000 */ #define CST_5VW_CAP_WAN (CST_5VW_FAMILY_CAP_WAN << CST_5VW_DECALE_FILE_FAMILY) /* 0x00002000 */ #define CST_5VW_CAPTURE_ETH_FILEID (CST_5VW_CAPTURE_FILEID | CST_5VW_CAP_ETH) #define CST_5VW_CAPTURE_WAN_FILEID (CST_5VW_CAPTURE_FILEID | CST_5VW_CAP_WAN) -#define CST_5VW_CAPTURE_FILE_TYPE_MASK 0xFF000000 +#define CST_5VW_CAPTURE_FILE_TYPE_MASK 0xFF000000U -#define CST_5VW_FRAME_RECORD 0x00000000 -#define CST_5VW_RECORDS_HEADER_KEY 0x3333EEEE +#define CST_5VW_FRAME_RECORD 0x00000000U +#define CST_5VW_RECORDS_HEADER_KEY 0x3333EEEEU typedef struct { @@ -97,11 +97,11 @@ typedef struct }t_5VW_TimeStamped_Header; -#define CST_5VW_IA_CAP_INF_NB_TRAMES_STOCKEES 0x20000000 -#define CST_5VW_IA_DATE_CREATION 0x80000007 /* Struct t_Attrib_Date_Create */ -#define CST_5VW_TIMESTAMPED_HEADER_TYPE 0x4000 +#define CST_5VW_IA_CAP_INF_NB_TRAMES_STOCKEES 0x20000000U +#define CST_5VW_IA_DATE_CREATION 0x80000007U /* Struct t_Attrib_Date_Create */ +#define CST_5VW_TIMESTAMPED_HEADER_TYPE 0x4000U #define CST_5VW_CAPTURES_RECORD (CST_5VW_SECTION_CAPTURES << 28) /* 0x80000000 */ -#define CST_5VW_SYSTEM_RECORD 0x00000000 +#define CST_5VW_SYSTEM_RECORD 0x00000000U static gboolean _5views_read(wtap *wth, int *err, gchar **err_info, gint64 *data_offset); diff --git a/wiretap/iseries.c b/wiretap/iseries.c index 10c0d39acf..b9441884eb 100644 --- a/wiretap/iseries.c +++ b/wiretap/iseries.c @@ -255,7 +255,7 @@ iseries_check_file_type (wtap * wth, int *err, int format) guint line; int num_items_scanned; char buf[ISERIES_LINE_LENGTH], protocol[9], tcpformat[2]; - guint8 *sdate; + char *sdate; /* Save trace format for passing between packets */ sdate = g_malloc (10); @@ -273,7 +273,7 @@ iseries_check_file_type (wtap * wth, int *err, int format) */ if (wth->capture.iseries->format == ISERIES_FORMAT_UNICODE) { - iseries_UNICODE_to_ASCII (buf, ISERIES_LINE_LENGTH); + iseries_UNICODE_to_ASCII ((guint8 *)buf, ISERIES_LINE_LENGTH); } g_strup(buf); num_items_scanned = sscanf (buf, @@ -386,7 +386,7 @@ iseries_seek_next_packet (wtap * wth, int *err) if (wth->capture.iseries->format == ISERIES_FORMAT_UNICODE) { /* buflen is #bytes to 1st 0x0A */ - buflen = iseries_UNICODE_to_ASCII (buf, ISERIES_LINE_LENGTH); + buflen = iseries_UNICODE_to_ASCII ((guint8 *)buf, ISERIES_LINE_LENGTH); } else { @@ -481,7 +481,8 @@ iseries_parse_packet (wtap * wth, FILE_T fh, tcpheader[81]; char hex1[17], hex2[17], hex3[17], hex4[17]; char data[ISERIES_LINE_LENGTH * 2]; - guint8 *buf, *asciibuf, *tcpdatabuf, *workbuf; + guint8 *buf; + char *asciibuf, *tcpdatabuf, *workbuf; struct tm tm; /* @@ -505,7 +506,7 @@ iseries_parse_packet (wtap * wth, FILE_T fh, /* Convert UNICODE data to ASCII */ if (wth->capture.iseries->format == ISERIES_FORMAT_UNICODE) { - iseries_UNICODE_to_ASCII (data, ISERIES_LINE_LENGTH); + iseries_UNICODE_to_ASCII ((guint8 *)data, ISERIES_LINE_LENGTH); } /* look for packet header */ for (i=0; i<8; i++) { @@ -543,7 +544,7 @@ iseries_parse_packet (wtap * wth, FILE_T fh, /* * If we have Wiretap Header then populate it here * - * XXX - Timer resolution on the iSeries is hardware dependant, the value for csec may be + * XXX - Timer resolution on the iSeries is hardware dependant; the value for csec may be * different on other platforms though all the traces I've seen seem to show resolution * to Milliseconds (i.e HH:MM:SS.nnnnn) or Nanoseconds (i.e HH:MM:SS.nnnnnn) */ @@ -614,7 +615,7 @@ iseries_parse_packet (wtap * wth, FILE_T fh, /* Convert UNICODE data to ASCII and determine line length */ if (wth->capture.iseries->format == ISERIES_FORMAT_UNICODE) { - buflen = iseries_UNICODE_to_ASCII (data, ISERIES_LINE_LENGTH); + buflen = iseries_UNICODE_to_ASCII ((guint8 *)data, ISERIES_LINE_LENGTH); } else { diff --git a/wiretap/wtap-int.h b/wiretap/wtap-int.h index 780cde2bfe..807f93b25b 100644 --- a/wiretap/wtap-int.h +++ b/wiretap/wtap-int.h @@ -53,7 +53,7 @@ typedef struct { } ngsniffer_comp_stream_t; typedef struct { - guint8 *sdate; /* Packet start date */ + char *sdate; /* Packet start date */ gboolean tcp_formatted; /* TCP/IP data formated Y/N */ int format; /* Trace format type */ } iseries_t; |