aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-per.c
diff options
context:
space:
mode:
authordario <lomato@gmail.com>2016-11-15 09:56:22 +0100
committerDario Lombardo <lomato@gmail.com>2016-11-15 09:27:54 +0000
commitd0cf1de0f976a4283cbc0a021cf8394bf8956fe4 (patch)
tree7428ec401b3c26c30fc862d442bcfcc8698f7902 /epan/dissectors/packet-per.c
parentf3670b9fa51c0fe04744c630bcab80ef81708e89 (diff)
per: add initializer.
Travis CI found the following errors: wireshark/epan/dissectors/packet-per.c: In function ‘dissect_per_open_type_internal’: wireshark/epan/dissectors/packet-per.c:193:24: error: ‘pdu_tvb’ may be used uninitialized in this function [-Werror=maybe-uninitialized] tvb_composite_append(pdu_tvb, tvb_new_octet_aligned(tvb, offset, 8*type_length)); ^ wireshark/epan/dissectors/packet-per.c: In function ‘dissect_per_bit_string’: wireshark/epan/dissectors/packet-per.c:2269:24: error: ‘fragmented_tvb’ may be used uninitialized in this function [-Werror=maybe-uninitialized] tvb_composite_append(fragmented_tvb, tvb_new_octet_aligned(tvb, offset, length)); Change-Id: Idfd8bfc20439485f53e906a46e0717fc6199071c Reviewed-on: https://code.wireshark.org/review/18827 Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Dario Lombardo <lomato@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-per.c')
-rw-r--r--epan/dissectors/packet-per.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-per.c b/epan/dissectors/packet-per.c
index 5be86cae44..37d49a5fa3 100644
--- a/epan/dissectors/packet-per.c
+++ b/epan/dissectors/packet-per.c
@@ -175,7 +175,7 @@ static guint32
dissect_per_open_type_internal(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, void* type_cb, asn1_cb_variant variant)
{
guint32 type_length, start_offset, end_offset, fragmented_length = 0, pdu_length, pdu_offset;
- tvbuff_t *val_tvb = NULL, *pdu_tvb;
+ tvbuff_t *val_tvb = NULL, *pdu_tvb = NULL;
header_field_info *hfi;
proto_tree *subtree = tree;
gboolean is_fragmented;
@@ -2150,7 +2150,7 @@ dissect_per_bit_string(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tr
guint32 length, fragmented_length = 0;
header_field_info *hfi;
gboolean is_fragmented = FALSE;
- tvbuff_t *fragmented_tvb, *out_tvb = NULL;
+ tvbuff_t *fragmented_tvb = NULL, *out_tvb = NULL;
hfi = (hf_index==-1) ? NULL : proto_registrar_get_nth(hf_index);