aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-amqp.c10
-rw-r--r--epan/dissectors/packet-bgp.c2
-rw-r--r--epan/dissectors/packet-dns.c2
-rw-r--r--epan/dissectors/packet-dtpt.c2
-rw-r--r--epan/dissectors/packet-gtp.c4
-rw-r--r--epan/dissectors/packet-gtpv2.h4
-rw-r--r--epan/dissectors/packet-http.c1
-rw-r--r--epan/dissectors/packet-mpeg-descriptor.c1
-rw-r--r--epan/dissectors/packet-nas_5gs.c9
-rw-r--r--epan/dissectors/packet-pvfs2.c2
-rw-r--r--epan/dissectors/packet-sapms.c2
-rw-r--r--epan/dissectors/packet-saprouter.c2
-rw-r--r--epan/dissectors/packet-umts_fp.c16
-rw-r--r--epan/dissectors/packet-v5ua.c2
14 files changed, 28 insertions, 31 deletions
diff --git a/epan/dissectors/packet-amqp.c b/epan/dissectors/packet-amqp.c
index bb1656d411..0b0be0be5f 100644
--- a/epan/dissectors/packet-amqp.c
+++ b/epan/dissectors/packet-amqp.c
@@ -585,9 +585,9 @@ dissect_amqp_1_0_skip(tvbuff_t *tvb _U_, packet_info *pinfo _U_,
proto_item *item _U_, int hf_amqp_type _U_);
static int
-dissect_amqp_1_0_zero(tvbuff_t *tvb _U_, packet_info *pinfo _U_,
- guint offset _U_, guint length _U_,
- proto_item *item _U_, int hf_amqp_type _U_);
+dissect_amqp_1_0_zero(tvbuff_t *tvb, packet_info *pinfo,
+ guint offset, guint length _U_,
+ proto_item *item, int hf_amqp_type);
static int
dissect_amqp_1_0_true(tvbuff_t *tvb, packet_info *pinfo,
@@ -601,8 +601,8 @@ dissect_amqp_1_0_false(tvbuff_t *tvb, packet_info *pinfo,
static int
format_amqp_1_0_null(tvbuff_t *tvb _U_,
- guint offset, guint length _U_,
- const char **value _U_);
+ guint offset _U_, guint length _U_,
+ const char **value);
static int
format_amqp_1_0_boolean_true(tvbuff_t *tvb, guint offset, guint length _U_,
diff --git a/epan/dissectors/packet-bgp.c b/epan/dissectors/packet-bgp.c
index c3892b20c5..26a1331c0a 100644
--- a/epan/dissectors/packet-bgp.c
+++ b/epan/dissectors/packet-bgp.c
@@ -4788,7 +4788,7 @@ static int decode_bgp_link_node_nlri_common_fields(tvbuff_t *tvb,
length -= dissected_length;
/* dissect Local Node Descriptors TLV */
- if (length > 0 && length < 4) {
+ if (length < 4) {
expert_add_info_format(pinfo, tree, &ei_bgp_ls_error,
"Unknown data in Link-State Link NLRI! length = %d bytes", length);
return dissected_length;
diff --git a/epan/dissectors/packet-dns.c b/epan/dissectors/packet-dns.c
index c01bb5026d..d10f75e0ec 100644
--- a/epan/dissectors/packet-dns.c
+++ b/epan/dissectors/packet-dns.c
@@ -4453,7 +4453,7 @@ dissect_dns_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
ext_tree = proto_tree_add_subtree_format(dns_tree, tvb, cur_off, extraneous_length,
ett_dns_extraneous, &it, "Extraneous Data (%d bytes)", extraneous_length);
- it = proto_tree_add_item(ext_tree, hf_dns_extraneous_data, tvb, cur_off, extraneous_length, ENC_NA);
+ proto_tree_add_item(ext_tree, hf_dns_extraneous_data, tvb, cur_off, extraneous_length, ENC_NA);
it = proto_tree_add_int(ext_tree, hf_dns_extraneous_length, tvb, 0, 0, extraneous_length);
proto_item_set_generated(it);
diff --git a/epan/dissectors/packet-dtpt.c b/epan/dissectors/packet-dtpt.c
index 1933adaaa8..42f41ba00d 100644
--- a/epan/dissectors/packet-dtpt.c
+++ b/epan/dissectors/packet-dtpt.c
@@ -426,7 +426,7 @@ dissect_dtpt_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *dtpt_addrs_tree = NULL;
guint32 blob_rawsize = 0;
guint32 blob_size = 0;
- guint32 blob_data_length = 0;
+ guint32 blob_data_length;
queryset_rawsize = tvb_get_letohl(tvb, offset + 0);
if (queryset_rawsize != 60) return 0;
diff --git a/epan/dissectors/packet-gtp.c b/epan/dissectors/packet-gtp.c
index 12b4c85043..49cc2cfa94 100644
--- a/epan/dissectors/packet-gtp.c
+++ b/epan/dissectors/packet-gtp.c
@@ -2748,11 +2748,11 @@ static int decode_gtp_sig_pri_ind(tvbuff_t * tvb, int offset, packet_info * pinf
static int decode_gtp_sig_pri_ind_w_nsapi(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_);
static int decode_gtp_higher_br_16mb_flg(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_);
static int decode_gtp_max_mbr_apn_ambr(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_);
-static int decode_gtp_add_mm_ctx_srvcc(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_);
+static int decode_gtp_add_mm_ctx_srvcc(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree, session_args_t * args _U_);
static int decode_gtp_add_flgs_srvcc(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_);
static int decode_gtp_stn_sr(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_);
static int decode_gtp_c_msisdn(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_);
-static int decode_gtp_ext_ranap_cause(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_);
+static int decode_gtp_ext_ranap_cause(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree, session_args_t * args _U_);
static int decode_gtp_ext_enodeb_id(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_);
static int decode_gtp_ext_sel_mode_w_nsapi(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_);
static int decode_gtp_ext_uli_timestamp(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_);
diff --git a/epan/dissectors/packet-gtpv2.h b/epan/dissectors/packet-gtpv2.h
index a4ba27386d..b6d61d4f54 100644
--- a/epan/dissectors/packet-gtpv2.h
+++ b/epan/dissectors/packet-gtpv2.h
@@ -12,11 +12,11 @@ extern void dissect_gtpv2_ie_common(tvbuff_t* tvb, packet_info* pinfo _U_, proto
extern void dissect_gtpv2_mbms_service_area(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_);
extern void dissect_gtpv2_mbms_session_duration(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_);
-extern void dissect_gtpv2_mbms_time_to_data_xfer(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_);
+extern void dissect_gtpv2_mbms_time_to_data_xfer(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_);
extern void dissect_gtpv2_arp(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_);
extern void dissect_gtpv2_fq_csid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_);
extern void dissect_gtpv2_selec_mode(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_);
-extern void dissect_gtpv2_epc_timer(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_);
+extern void dissect_gtpv2_epc_timer(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_);
extern void dissect_gtpv2_twan_identifier(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_);
/*Used by custom dissector*/
extern gchar* dissect_gtpv2_tai(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *offset, gboolean is_5gs);
diff --git a/epan/dissectors/packet-http.c b/epan/dissectors/packet-http.c
index 86a5045036..83d0fb9c38 100644
--- a/epan/dissectors/packet-http.c
+++ b/epan/dissectors/packet-http.c
@@ -3982,7 +3982,6 @@ dissect_http_heur_tls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
return FALSE;
}
- conv_data = get_http_conversation_data(pinfo, &conversation);
dissect_http_tls(tvb, pinfo, tree, data);
return TRUE;
}
diff --git a/epan/dissectors/packet-mpeg-descriptor.c b/epan/dissectors/packet-mpeg-descriptor.c
index 7e6121ba39..8447a28a0c 100644
--- a/epan/dissectors/packet-mpeg-descriptor.c
+++ b/epan/dissectors/packet-mpeg-descriptor.c
@@ -4051,7 +4051,6 @@ proto_mpeg_descriptor_dissect_nordig_lcd_v2(tvbuff_t *tvb, guint offset, guint l
guint8 channel_list_id;
guint8 channel_list_name_length;
guint8 descriptor_length;
- if (cnt < 1) return;
channel_list_id = tvb_get_guint8(tvb, offset);
channel_list_tree = proto_tree_add_subtree_format(tree, tvb, offset, ch_list_len,
diff --git a/epan/dissectors/packet-nas_5gs.c b/epan/dissectors/packet-nas_5gs.c
index 57404de50a..fb294c6d6c 100644
--- a/epan/dissectors/packet-nas_5gs.c
+++ b/epan/dissectors/packet-nas_5gs.c
@@ -4026,7 +4026,7 @@ de_nas_5gs_mm_extended_rejected_nssai(tvbuff_t* tvb, proto_tree* tree, packet_in
proto_tree* sub_partial_tree;
proto_tree* sub_rejected_tree;
proto_item* item;
- int i = 1;
+ int i;
guint num_partial_items = 1;
guint32 curr_offset = offset;
guint32 type_of_list, number_of_element, nssai_len;
@@ -10256,10 +10256,9 @@ dissect_nas_5gs_media_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
str = json_get_string(json_data, cur_tok, "contentId");
} else {
/* TS 29.502 ch6.1.6.4.4 n1SmInfoFromUe, n1SmInfoToUe, unknownN1SmInfo */
- if (!cur_tok) {
- cur_tok = json_get_object(json_data, tokens, N1_SMINFO_FROM_UE);
- n1_msg_class = N1_SMINFO_FROM_UE;
- }
+ cur_tok = json_get_object(json_data, tokens, N1_SMINFO_FROM_UE);
+ n1_msg_class = N1_SMINFO_FROM_UE;
+
if (!cur_tok) {
cur_tok = json_get_object(json_data, tokens, N1_SMINFO_TO_UE);
n1_msg_class = N1_SMINFO_TO_UE;
diff --git a/epan/dissectors/packet-pvfs2.c b/epan/dissectors/packet-pvfs2.c
index c76590e3a1..8c22cbff89 100644
--- a/epan/dissectors/packet-pvfs2.c
+++ b/epan/dissectors/packet-pvfs2.c
@@ -717,7 +717,7 @@ dissect_pvfs2_attrmask(tvbuff_t *tvb, proto_tree *tree, int offset,
for (i = 0; i < 32; i++)
{
- if (attrmask & (1 << i))
+ if (attrmask & (1u << i))
proto_tree_add_uint(attrtree, hf_pvfs_attr, tvb, offset, 4, i);
}
diff --git a/epan/dissectors/packet-sapms.c b/epan/dissectors/packet-sapms.c
index 4e6a3b9750..7955ddfdfe 100644
--- a/epan/dissectors/packet-sapms.c
+++ b/epan/dissectors/packet-sapms.c
@@ -662,7 +662,7 @@ dissect_sapms_adm_record(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gu
proto_item *record = NULL, *value = NULL;
proto_tree *record_tree = NULL, *value_tree = NULL;
- guint8 adm_opcode = 0;
+ guint8 adm_opcode;
while (length>=104){
diff --git a/epan/dissectors/packet-saprouter.c b/epan/dissectors/packet-saprouter.c
index 763a3eab3a..9acd3dce42 100644
--- a/epan/dissectors/packet-saprouter.c
+++ b/epan/dissectors/packet-saprouter.c
@@ -416,7 +416,7 @@ static int
dissect_saprouter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
{
tvbuff_t *next_tvb = NULL;
- guint8 opcode = 0;
+ guint8 opcode;
guint32 offset = 0, eyecatcher_length = 0;
conversation_t *conversation = NULL;
saprouter_session_state *session_state = NULL;
diff --git a/epan/dissectors/packet-umts_fp.c b/epan/dissectors/packet-umts_fp.c
index 9b70b8a909..b8f9636aea 100644
--- a/epan/dissectors/packet-umts_fp.c
+++ b/epan/dissectors/packet-umts_fp.c
@@ -1486,7 +1486,7 @@ dissect_rach_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
guint32 ft;
guint32 header_crc = 0;
proto_item * header_crc_pi = NULL;
- guint header_length = 0;
+ guint header_length;
/* Header CRC */
header_crc_pi = proto_tree_add_item_ret_uint(tree, hf_fp_header_crc, tvb, offset, 1, ENC_BIG_ENDIAN, &header_crc);
@@ -1742,7 +1742,7 @@ dissect_fach_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
guint32 ft;
guint32 header_crc = 0;
proto_item * header_crc_pi = NULL;
- guint header_length = 0;
+ guint header_length;
/* Header CRC */
header_crc_pi = proto_tree_add_item_ret_uint(tree, hf_fp_header_crc, tvb, offset, 1, ENC_BIG_ENDIAN, &header_crc);
@@ -2538,7 +2538,7 @@ dissect_dch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
{
guint32 ft;
guint32 cfn;
- guint header_length = 0;
+ guint header_length;
guint32 header_crc = 0;
proto_item * header_crc_pi = NULL;
@@ -2613,7 +2613,7 @@ dissect_e_dch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
guint32 header_crc = 0;
proto_item * header_crc_pi = NULL;
proto_item * item;
- guint header_length = 0;
+ guint header_length;
rlc_info * rlcinf;
if (p_fp_info->edch_type == 1) {
@@ -2645,7 +2645,7 @@ dissect_e_dch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
else {
/********************************/
/* E-DCH data here */
- guint bit_offset = 0;
+ guint bit_offset;
guint total_pdus = 0;
guint total_bits = 0;
gboolean dissected = FALSE;
@@ -3169,7 +3169,7 @@ dissect_hsdsch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
int offset, struct fp_info *p_fp_info, void *data)
{
guint32 ft;
- guint header_length = 0;
+ guint header_length;
guint32 header_crc = 0;
proto_item * header_crc_pi = NULL;
@@ -3388,7 +3388,7 @@ dissect_hsdsch_type_2_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree
guint32 ft;
guint32 header_crc = 0;
proto_item * header_crc_pi = NULL;
- guint16 header_length = 0;
+ guint16 header_length;
/* Header CRC */
header_crc_pi = proto_tree_add_item_ret_uint(tree, hf_fp_header_crc, tvb, offset, 1, ENC_BIG_ENDIAN, &header_crc);
@@ -3649,7 +3649,7 @@ void dissect_hsdsch_common_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto
guint32 ft;
guint32 header_crc = 0;
proto_item * header_crc_pi = NULL;
- guint header_length = 0;
+ guint header_length;
/* Header CRC */
header_crc_pi = proto_tree_add_item_ret_uint(tree, hf_fp_header_crc, tvb, offset, 1, ENC_BIG_ENDIAN, &header_crc);
diff --git a/epan/dissectors/packet-v5ua.c b/epan/dissectors/packet-v5ua.c
index 0859b51518..150ee4a323 100644
--- a/epan/dissectors/packet-v5ua.c
+++ b/epan/dissectors/packet-v5ua.c
@@ -246,7 +246,7 @@ dissect_dlci_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, prot
"ISDN (%u)", efa);
proto_item_append_text(parameter_item, " (SAPI:%u TEI:%u EFA:ISDN (%u))",sapi,tei,efa);
}
- else if (efa > 8175 && efa <= 8180){
+ else if (efa <= 8180){
proto_tree_add_uint_format_value(parameter_tree, hf_efa, parameter_tvb, offset, EFA_LENGTH, efa,
"%s (%u)", val_to_str_const(efa, efa_values, "unknown EFA"),tvb_get_ntohs(parameter_tvb, offset));
proto_item_append_text(parameter_item, " (SAPI:%u TEI:%u EFA:%s (%u))",sapi,tei,val_to_str_const(efa, efa_values, "unknown EFA-value"),efa);