aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2016-07-05 23:08:30 +0200
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2016-07-06 06:48:10 +0000
commit50d1d59213886de1f348d85175dbdbe82fe1c87c (patch)
treee14ab9a2bd71f0d87910718f43081c2a2624577c
parent4b484a6d1af9155eac0d8016cce712963cc9405e (diff)
Qt: add initializers (CID 1162824).
Change-Id: Ib570d3531bfdd35404b75d49dbd7dd43db4c30d9 Reviewed-on: https://code.wireshark.org/review/16310 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
-rw-r--r--ui/gtk/tcp_graph.c2
-rw-r--r--ui/qt/tcp_stream_dialog.cpp18
-rw-r--r--ui/tap-tcp-stream.h3
3 files changed, 22 insertions, 1 deletions
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_, &current);
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 {