aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2017-09-05 12:39:09 +0100
committerJoão Valverde <j@v6e.pt>2017-09-05 22:31:01 +0000
commit299bd4628a9aa8e6ea2c8772576e171f100da001 (patch)
tree720e18f0b888fdba994a89cf959f6fdf4e6edf71
parent0dee5c1911337e1cb8d8836eb6aec8b8abd72fa0 (diff)
Fix unitialized variable warnings that popped up with -Og
Using GCC version 7.1.1. Change-Id: I7447a48fc97efb1eb15a016a29165f69d37f40a6 Reviewed-on: https://code.wireshark.org/review/23399 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
-rw-r--r--epan/dissectors/packet-ancp.c2
-rw-r--r--epan/dissectors/packet-couchbase.c2
-rw-r--r--epan/dissectors/packet-ieee80211.c2
-rw-r--r--epan/dissectors/packet-ieee802154.c2
-rw-r--r--epan/dissectors/packet-kafka.c2
-rw-r--r--epan/dissectors/packet-tcp.c2
-rw-r--r--epan/tap.c2
-rw-r--r--ui/qt/sctp_graph_dialog.cpp2
8 files changed, 8 insertions, 8 deletions
diff --git a/epan/dissectors/packet-ancp.c b/epan/dissectors/packet-ancp.c
index 614ffc6dd5..1c81f23d29 100644
--- a/epan/dissectors/packet-ancp.c
+++ b/epan/dissectors/packet-ancp.c
@@ -634,7 +634,7 @@ dissect_ancp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
struct ancp_tap_t *ancp_info;
proto_item *ti;
proto_item *sti;
- proto_item *tti;
+ proto_item *tti = NULL;
proto_tree *ancp_tree;
proto_tree *tlv_tree;
guint8 byte;
diff --git a/epan/dissectors/packet-couchbase.c b/epan/dissectors/packet-couchbase.c
index ae03779ae5..22168e0634 100644
--- a/epan/dissectors/packet-couchbase.c
+++ b/epan/dissectors/packet-couchbase.c
@@ -1774,7 +1774,7 @@ dissect_value(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
}
} else if (request && opcode == PROTOCOL_BINARY_CMD_CREATE_BUCKET) {
gint sep, equals_pos, sep_pos, config_len;
- proto_tree *key_tree, *config_tree;
+ proto_tree *key_tree, *config_tree = NULL;
/* There are 2 main items stored in the value. The bucket type (represented by a path to the engine) and the
* bucket config. These are separated by a NULL byte with the bucket type coming first.*/
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c
index 7c6aa2b870..50da86a421 100644
--- a/epan/dissectors/packet-ieee80211.c
+++ b/epan/dissectors/packet-ieee80211.c
@@ -14544,7 +14544,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset
* present in that list. Otherwise stop decoding the value to prevent possible
* infinite recursions due to unexpected elements. */
if (valid_element_ids_count) {
- gboolean valid_tag_no;
+ gboolean valid_tag_no = FALSE;
guint i;
for (i = 0; i < valid_element_ids_count; i++) {
diff --git a/epan/dissectors/packet-ieee802154.c b/epan/dissectors/packet-ieee802154.c
index 53f5d2bc9d..f856d008da 100644
--- a/epan/dissectors/packet-ieee802154.c
+++ b/epan/dissectors/packet-ieee802154.c
@@ -2243,7 +2243,7 @@ dissect_ietf_ie(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *ies_tree, voi
guint8 version;
guint8 type;
guint8 code;
- guint8 num_cells;
+ guint8 num_cells = 0;
gboolean have_cell_list = FALSE;
int i;
proto_item *sixtop_item = NULL;
diff --git a/epan/dissectors/packet-kafka.c b/epan/dissectors/packet-kafka.c
index ddc1ce7efa..6f190fdb1e 100644
--- a/epan/dissectors/packet-kafka.c
+++ b/epan/dissectors/packet-kafka.c
@@ -695,7 +695,7 @@ dissect_kafka_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int s
{
proto_item *message_ti, *decrypt_item;
proto_tree *subtree;
- tvbuff_t *raw, *payload;
+ tvbuff_t *raw, *payload = NULL;
int offset = start_offset;
gint8 magic_byte;
guint8 codec;
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c
index 3dba79ca93..e7997439f5 100644
--- a/epan/dissectors/packet-tcp.c
+++ b/epan/dissectors/packet-tcp.c
@@ -867,7 +867,7 @@ check_follow_fragments(follow_info_t *follow_info, gboolean is_server, guint32 a
{
GList *fragment_entry;
follow_record_t *fragment, *follow_record;
- guint32 lowest_seq;
+ guint32 lowest_seq = 0;
gchar *dummy_str;
fragment_entry = g_list_first(follow_info->fragments[is_server]);
diff --git a/epan/tap.c b/epan/tap.c
index 3db0d5cc7a..0111412d60 100644
--- a/epan/tap.c
+++ b/epan/tap.c
@@ -222,7 +222,7 @@ tap_init(void)
int
register_tap(const char *name)
{
- tap_dissector_t *td, *tdl = NULL, *tdl_prev;
+ tap_dissector_t *td, *tdl = NULL, *tdl_prev = NULL;
int i=0;
if(tap_dissector_list){
diff --git a/ui/qt/sctp_graph_dialog.cpp b/ui/qt/sctp_graph_dialog.cpp
index f1d35e36ef..5b664debfb 100644
--- a/ui/qt/sctp_graph_dialog.cpp
+++ b/ui/qt/sctp_graph_dialog.cpp
@@ -79,7 +79,7 @@ void SCTPGraphDialog::drawNRSACKGraph()
GList *list=NULL, *tlist;
guint16 gap_start=0, gap_end=0, i, numberOf_gaps, numberOf_nr_gaps;
guint8 type;
- guint32 tsnumber, j, min_tsn;
+ guint32 tsnumber, j = 0, min_tsn;
struct nr_sack_chunk_header *nr_sack_header;
struct gaps *nr_gap;
/* This holds the sum of gap acks and nr gap acks */