From 50d1d59213886de1f348d85175dbdbe82fe1c87c Mon Sep 17 00:00:00 2001 From: Dario Lombardo Date: Tue, 5 Jul 2016 23:08:30 +0200 Subject: Qt: add initializers (CID 1162824). Change-Id: Ib570d3531bfdd35404b75d49dbd7dd43db4c30d9 Reviewed-on: https://code.wireshark.org/review/16310 Petri-Dish: Dario Lombardo Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte --- ui/gtk/tcp_graph.c | 2 ++ ui/qt/tcp_stream_dialog.cpp | 18 ++++++++++++++++++ ui/tap-tcp-stream.h | 3 ++- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/ui/gtk/tcp_graph.c b/ui/gtk/tcp_graph.c index 37386a667f..66e4ff0412 100644 --- a/ui/gtk/tcp_graph.c +++ b/ui/gtk/tcp_graph.c @@ -1553,6 +1553,8 @@ static GtkWidget *control_panel_create_graph_type_group(struct gtk_graph *g) case GRAPH_WSCALE: gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(graph_wscale), TRUE); break; + case GRAPH_UNDEFINED: + break; } graph_init = gtk_check_button_new_with_label("Init on change"); graph_sep = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); diff --git a/ui/qt/tcp_stream_dialog.cpp b/ui/qt/tcp_stream_dialog.cpp index 507bd4bc8f..d23afc119b 100644 --- a/ui/qt/tcp_stream_dialog.cpp +++ b/ui/qt/tcp_stream_dialog.cpp @@ -84,8 +84,18 @@ TCPStreamDialog::TCPStreamDialog(QWidget *parent, capture_file *cf, tcp_graph_ty QDialog(NULL, Qt::Window), ui(new Ui::TCPStreamDialog), cap_file_(cf), + ts_offset_(0), ts_origin_conn_(true), + seq_offset_(0), seq_origin_zero_(true), + title_(NULL), + base_graph_(NULL), + tput_graph_(NULL), + seg_graph_(NULL), + ack_graph_(NULL), + rwin_graph_(NULL), + tracer_(NULL), + packet_num_(0), mouse_drags_(true), rubber_band_(NULL), num_dsegs_(-1), @@ -98,6 +108,14 @@ TCPStreamDialog::TCPStreamDialog(QWidget *parent, capture_file *cf, tcp_graph_ty ui->setupUi(this); setAttribute(Qt::WA_DeleteOnClose, true); + graph_.type = GRAPH_UNDEFINED; + set_address(&graph_.src_address, AT_NONE, 0, NULL); + graph_.src_port = 0; + set_address(&graph_.dst_address, AT_NONE, 0, NULL); + graph_.dst_port = 0; + graph_.stream = 0; + graph_.segments = NULL; + struct tcpheader *header = select_tcpip_session(cap_file_, ¤t); if (!header) { done(QDialog::Rejected); diff --git a/ui/tap-tcp-stream.h b/ui/tap-tcp-stream.h index dde701ae7f..f430fa5fa5 100644 --- a/ui/tap-tcp-stream.h +++ b/ui/tap-tcp-stream.h @@ -34,7 +34,8 @@ typedef enum tcp_graph_type_ { GRAPH_TSEQ_TCPTRACE, GRAPH_THROUGHPUT, GRAPH_RTT, - GRAPH_WSCALE + GRAPH_WSCALE, + GRAPH_UNDEFINED } tcp_graph_type; struct segment { -- cgit v1.2.3