aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>2009-11-10 12:05:25 +0000
committerstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>2009-11-10 12:05:25 +0000
commit1f1c0a38aaf0ef838f3783652970c2e308aa437c (patch)
treef3febdc4d98050c226ef2a682e8534319f36d1fb
parentf6f71f52c4468f826e9dd7eb3921db8322daaea9 (diff)
Removed some unused variables and unused assignments.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30918 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r--gtk/capture_file_dlg.c4
-rw-r--r--gtk/color_dlg.c2
-rw-r--r--gtk/color_edit_dlg.c5
-rw-r--r--gtk/conversations_table.c4
-rw-r--r--gtk/decode_as_dlg.c2
-rw-r--r--gtk/dfilter_expr_dlg.c7
-rw-r--r--gtk/drag_and_drop.c7
-rw-r--r--gtk/filter_autocomplete.c3
-rw-r--r--gtk/filter_dlg.c6
-rw-r--r--gtk/follow_ssl.c3
-rw-r--r--gtk/follow_udp.c4
-rw-r--r--gtk/font_utils.c1
-rw-r--r--gtk/graph_analysis.c10
-rw-r--r--gtk/gsm_map_stat.c2
-rw-r--r--gtk/packet_list_store.c3
-rw-r--r--gtk/prefs_capture.c1
-rw-r--r--gtk/profile_dlg.c2
-rw-r--r--gtk/proto_hier_stats_dlg.c7
-rw-r--r--gtk/rtp_stream_dlg.c1
-rw-r--r--gtk/supported_protos_dlg.c5
20 files changed, 10 insertions, 69 deletions
diff --git a/gtk/capture_file_dlg.c b/gtk/capture_file_dlg.c
index 24acb38710..077646e647 100644
--- a/gtk/capture_file_dlg.c
+++ b/gtk/capture_file_dlg.c
@@ -1192,7 +1192,6 @@ file_save_as_cmd(action_after_save_e action_after_save, gpointer action_after_sa
win32_save_as_file(GDK_WINDOW_HWND(top_level->window), action_after_save, action_after_save_data);
#else /* _WIN32 */
GtkWidget *main_vb, *ft_hb, *ft_lb, *range_fr, *compressed_cb;
- GtkTooltips *tooltips;
if (file_save_as_w != NULL) {
/* There's already an "Save Capture File As" dialog box; reactivate it. */
@@ -1206,9 +1205,6 @@ file_save_as_cmd(action_after_save_e action_after_save, gpointer action_after_sa
/* init the packet range */
packet_range_init(&range);
- /* Enable tooltips */
- tooltips = gtk_tooltips_new();
-
/* build the file selection */
file_save_as_w = file_selection_new ("Wireshark: Save Capture File As",
FILE_SELECTION_SAVE);
diff --git a/gtk/color_dlg.c b/gtk/color_dlg.c
index 2e5ea68477..6bb0fd45a1 100644
--- a/gtk/color_dlg.c
+++ b/gtk/color_dlg.c
@@ -705,13 +705,11 @@ static void
select_row(GtkWidget *color_filters, int row)
{
GtkTreeModel *model;
- gint num_filters;
GtkTreeIter iter;
GtkTreeSelection *sel;
/* select the new row */
model = gtk_tree_view_get_model(GTK_TREE_VIEW(color_filters));
- num_filters = gtk_tree_model_iter_n_children(model, NULL);
gtk_tree_model_iter_nth_child(model, &iter, NULL, row);
sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(color_filters));
gtk_tree_selection_select_iter(sel, &iter);
diff --git a/gtk/color_edit_dlg.c b/gtk/color_edit_dlg.c
index 009a72ce40..3ebf512e13 100644
--- a/gtk/color_edit_dlg.c
+++ b/gtk/color_edit_dlg.c
@@ -532,7 +532,7 @@ color_sel_ok_cb (GtkButton *button _U_,
GdkColor new_color; /* Color from color selection dialog */
GtkWidget *color_dialog;
GtkWidget *parent;
- GtkWidget *color_selection_fg, *color_selection_bg;
+ GtkWidget *color_selection_bg;
gboolean is_bg;
color_dialog = (GtkWidget *)user_data;
@@ -550,7 +550,6 @@ color_sel_ok_cb (GtkButton *button _U_,
/* Find that dialog box's foreground and background color selection
boxes, if any. */
- color_selection_fg = g_object_get_data(G_OBJECT(parent), COLOR_SELECTION_FG);
color_selection_bg = g_object_get_data(G_OBJECT(parent), COLOR_SELECTION_BG);
is_bg = (color_dialog == color_selection_bg);
@@ -559,7 +558,7 @@ color_sel_ok_cb (GtkButton *button _U_,
/* now apply the change to the fore/background */
if (is_bg)
gtk_widget_modify_base(filt_name_entry, GTK_STATE_NORMAL, &new_color);
- else
+ else
gtk_widget_modify_text(filt_name_entry, GTK_STATE_NORMAL, &new_color);
}
}
diff --git a/gtk/conversations_table.c b/gtk/conversations_table.c
index e53f22bbc0..2a6222302e 100644
--- a/gtk/conversations_table.c
+++ b/gtk/conversations_table.c
@@ -1840,7 +1840,6 @@ add_conversation_table_data(conversations_table *ct, const address *src, const a
guint32 port1, port2;
conv_t *conversation=NULL;
unsigned int conversation_idx=0;
- gboolean new_conversation;
if(src_port>dst_port){
addr1=src;
@@ -1864,11 +1863,9 @@ add_conversation_table_data(conversations_table *ct, const address *src, const a
port1=dst_port;
}
- new_conversation=FALSE;
/* if we dont have any entries at all yet */
if(ct->conversations==NULL){
ct->conversations= g_array_sized_new(FALSE, FALSE, sizeof(conv_t), 10000);
- conversation_idx=0;
ct->hashtable = g_hash_table_new_full(conversation_hash,
conversation_match, /* key_equal_func */
@@ -1896,7 +1893,6 @@ add_conversation_table_data(conversations_table *ct, const address *src, const a
if(conversation==NULL){
conv_key_t *new_key;
conv_t conv;
- new_conversation=TRUE;
COPY_ADDRESS(&conv.src_address, addr1);
COPY_ADDRESS(&conv.dst_address, addr2);
diff --git a/gtk/decode_as_dlg.c b/gtk/decode_as_dlg.c
index f0affeeb48..7842222b7a 100644
--- a/gtk/decode_as_dlg.c
+++ b/gtk/decode_as_dlg.c
@@ -1012,7 +1012,6 @@ decode_add_yes_no (void)
gtk_box_pack_start(GTK_BOX(format_vb), radio_button, TRUE, TRUE, 0);
radio_button = gtk_radio_button_new_with_label(format_grp, "Do not decode");
- format_grp = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radio_button));
g_signal_connect(radio_button, "clicked", G_CALLBACK(decode_update_action),
GINT_TO_POINTER(E_DECODE_NO));
gtk_box_pack_start(GTK_BOX(format_vb), radio_button, TRUE, TRUE, 0);
@@ -1585,7 +1584,6 @@ decode_sctp_add_port_ppid (GtkWidget *page)
gtk_box_pack_start(GTK_BOX(format_vb), radio_button, TRUE, TRUE, 0);
radio_button = gtk_radio_button_new_with_label(format_grp, "Port");
- format_grp = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radio_button));
g_signal_connect(radio_button, "clicked", G_CALLBACK(decode_sctp_update_srcdst_menu), page);
gtk_box_pack_start(GTK_BOX(format_vb), radio_button, TRUE, TRUE, 0);
diff --git a/gtk/dfilter_expr_dlg.c b/gtk/dfilter_expr_dlg.c
index 40c06bee59..ae030a2f79 100644
--- a/gtk/dfilter_expr_dlg.c
+++ b/gtk/dfilter_expr_dlg.c
@@ -455,13 +455,6 @@ display_value_fields(header_field_info *hfinfo, gboolean is_comparison,
*
* so we hide the value entry.
*/
- show_value_list = is_comparison;
- if (is_comparison) {
- /*
- * If we're showing the entry; show the label as well.
- */
- show_value_label = TRUE;
- }
switch (hfinfo->type) {
diff --git a/gtk/drag_and_drop.c b/gtk/drag_and_drop.c
index f5bd0db1ee..c0ca337f19 100644
--- a/gtk/drag_and_drop.c
+++ b/gtk/drag_and_drop.c
@@ -206,7 +206,6 @@ dnd_open_file_cmd(gchar *cf_names_freeme)
int err;
gchar *cf_name;
int in_files;
- gpointer dialog;
GString *dialog_text;
int files_work;
char **in_filenames;
@@ -270,7 +269,7 @@ dnd_open_file_cmd(gchar *cf_names_freeme)
g_string_append(dialog_text, "\n");
}
g_string_append(dialog_text, "\nThe packets in these files will be merged chronologically into a new temporary file.");
- dialog = simple_dialog(ESD_TYPE_CONFIRMATION,
+ simple_dialog(ESD_TYPE_CONFIRMATION,
ESD_BTN_OK, "%s",
dialog_text->str);
g_string_free(dialog_text, TRUE);
@@ -322,7 +321,7 @@ GtkSelectionData *selection_data, guint info, guint t _U_, gpointer data _U_)
#ifdef HAVE_LIBPCAP
/* if a capture is running, do nothing but warn the user */
if((global_capture_opts.state != CAPTURE_STOPPED)) {
- dialog = simple_dialog(ESD_TYPE_CONFIRMATION,
+ simple_dialog(ESD_TYPE_CONFIRMATION,
ESD_BTN_OK,
"%sDrag and Drop currently not possible!%s\n\n"
"Dropping a file isn't possible while a capture is in progress.",
@@ -333,7 +332,7 @@ GtkSelectionData *selection_data, guint info, guint t _U_, gpointer data _U_)
/* if another file read is still in progress, do nothing but warn the user */
if((cfile.state == FILE_READ_IN_PROGRESS)) {
- dialog = simple_dialog(ESD_TYPE_CONFIRMATION,
+ simple_dialog(ESD_TYPE_CONFIRMATION,
ESD_BTN_OK,
"%sDrag and Drop currently not possible!%s\n\n"
"Dropping a file isn't possible while loading another capture file.",
diff --git a/gtk/filter_autocomplete.c b/gtk/filter_autocomplete.c
index f169f27de1..f72ba99ffc 100644
--- a/gtk/filter_autocomplete.c
+++ b/gtk/filter_autocomplete.c
@@ -263,7 +263,6 @@ autocompletion_list_lookup(GtkWidget *filter_te, GtkWidget *popup_win, GtkWidget
GtkRequisition requisition;
GtkListStore *store;
GtkTreeIter iter;
- GtkTreeSelection *selection;
gchar *curr_str;
unsigned int str_len = (unsigned int) strlen(str);
gchar *first = NULL;
@@ -275,8 +274,6 @@ autocompletion_list_lookup(GtkWidget *filter_te, GtkWidget *popup_win, GtkWidget
if( gtk_tree_model_get_iter_first(GTK_TREE_MODEL(store), &iter) ) {
- selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(list));
-
do {
gtk_tree_model_get(GTK_TREE_MODEL(store), &iter, 0, &curr_str, -1);
diff --git a/gtk/filter_dlg.c b/gtk/filter_dlg.c
index 803f8fd9e2..45ccb57ced 100644
--- a/gtk/filter_dlg.c
+++ b/gtk/filter_dlg.c
@@ -129,8 +129,7 @@ capture_filter_construct_cb(GtkWidget *w, gpointer user_data _U_)
parent_filter_te = g_object_get_data(G_OBJECT(w), E_FILT_TE_PTR_KEY);
/* Now create a new dialog, without an "Add Expression..." button. */
- filter_browse_w = filter_dialog_new(w, parent_filter_te,
- CFILTER_LIST, &args);
+ filter_dialog_new(w, parent_filter_te, CFILTER_LIST, &args);
}
#endif
@@ -167,8 +166,7 @@ display_filter_construct_cb(GtkWidget *w, gpointer construct_args_ptr)
/* Now create a new dialog, possibly with an "Apply" button, and
definitely with an "Add Expression..." button. */
- filter_browse_w = filter_dialog_new(w, parent_filter_te,
- DFILTER_LIST, construct_args);
+ filter_dialog_new(w, parent_filter_te, DFILTER_LIST, construct_args);
}
/* Should be called when a button that creates filters is destroyed; it
diff --git a/gtk/follow_ssl.c b/gtk/follow_ssl.c
index f128c4d735..16d147d39e 100644
--- a/gtk/follow_ssl.c
+++ b/gtk/follow_ssl.c
@@ -308,7 +308,6 @@ follow_read_ssl_stream(follow_info_t *follow_info,
gboolean (*print_line)(char *, size_t, gboolean, void *),
void *arg)
{
- int iplen;
guint32 global_client_pos = 0, global_server_pos = 0;
guint32 server_packet_count = 0;
guint32 client_packet_count = 0;
@@ -317,8 +316,6 @@ follow_read_ssl_stream(follow_info_t *follow_info,
GList* cur;
frs_return_t frs_return;
- iplen = (follow_info->is_ipv6) ? 16 : 4;
-
for (cur = follow_info->payload; cur; cur = g_list_next(cur)) {
SslDecryptedRecord* rec = cur->data;
skip = FALSE;
diff --git a/gtk/follow_udp.c b/gtk/follow_udp.c
index d95c580e2a..3ccf59c2e4 100644
--- a/gtk/follow_udp.c
+++ b/gtk/follow_udp.c
@@ -256,7 +256,6 @@ follow_read_udp_stream(follow_info_t *follow_info,
gboolean (*print_line)(char *, size_t, gboolean, void *),
void *arg)
{
- int iplen;
guint32 global_client_pos = 0, global_server_pos = 0;
guint32 server_packet_count = 0;
guint32 client_packet_count = 0;
@@ -267,8 +266,7 @@ follow_read_udp_stream(follow_info_t *follow_info,
follow_record_t *follow_record;
char *buffer;
- iplen = (follow_info->is_ipv6) ? 16 : 4;
-
+
for (cur = follow_info->payload; cur; cur = g_list_next(cur)) {
follow_record = cur->data;
skip = FALSE;
diff --git a/gtk/font_utils.c b/gtk/font_utils.c
index 50e4a5db4a..798cd7ef88 100644
--- a/gtk/font_utils.c
+++ b/gtk/font_utils.c
@@ -219,7 +219,6 @@ font_zoom(char *gui_font_name)
}
font_name_dup = g_strdup(gui_font_name);
- font_name_p = font_name_dup;
/* find the start of the font_size string */
font_name_p = strrchr(font_name_dup, ' ');
diff --git a/gtk/graph_analysis.c b/gtk/graph_analysis.c
index b8a5ee211a..ea6601d03a 100644
--- a/gtk/graph_analysis.c
+++ b/gtk/graph_analysis.c
@@ -496,10 +496,6 @@ static void save_to_file_destroy_cb(GtkWidget *win _U_, gpointer user_data _U_)
static void overwrite_existing_file_cb(gpointer dialog _U_, gint btn, gpointer user_data)
{
- graph_analysis_data_t *user_data_p;
-
- user_data_p = user_data;
-
switch(btn) {
case(ESD_BTN_YES):
/* overwrite the file*/
@@ -625,7 +621,6 @@ static void dialog_graph_draw(graph_analysis_data_t* user_data)
guint32 bottom_y_border;
graph_analysis_item_t *gai;
guint16 first_conv_num;
- gboolean several_convs = FALSE;
gboolean first_packet = TRUE;
GdkGC *frame_fg_color;
@@ -680,7 +675,6 @@ static void dialog_graph_draw(graph_analysis_data_t* user_data)
first_item = user_data->dlg.first_item;
display_items = draw_height/ITEM_HEIGHT;
- last_item = first_item+display_items-1;
/* get the items to display and fill the matrix array */
list = g_list_first(user_data->graph_info->list);
@@ -711,10 +705,6 @@ static void dialog_graph_draw(graph_analysis_data_t* user_data)
first_packet=FALSE;
}
- if (user_data->dlg.items[current_item].conv_num != first_conv_num){
- several_convs = TRUE;
- }
-
user_data->dlg.items[current_item].src_node = gai->src_node;
user_data->dlg.items[current_item].dst_node = gai->dst_node;
user_data->dlg.items[current_item].line_style = gai->line_style;
diff --git a/gtk/gsm_map_stat.c b/gtk/gsm_map_stat.c
index ab226f9bdd..83e2647eb3 100644
--- a/gtk/gsm_map_stat.c
+++ b/gtk/gsm_map_stat.c
@@ -329,7 +329,6 @@ gsm_map_stat_draw(
int i;
GtkListStore *list_store;
GtkTreeIter iter;
- guint id;
if (dlg.win && tapdata)
{
@@ -341,7 +340,6 @@ gsm_map_stat_draw(
float avrage_bytes_rev;
float avrage_bytes_tot;
- id = gsm_map_opr_code_strings[i].value;
if (stat_p->opr_code[i] >0){
avrage_bytes_fwd =(float)stat_p->size[i]/(float)stat_p->opr_code[i];
}else{
diff --git a/gtk/packet_list_store.c b/gtk/packet_list_store.c
index 142ab255c9..6258228352 100644
--- a/gtk/packet_list_store.c
+++ b/gtk/packet_list_store.c
@@ -336,14 +336,11 @@ packet_list_get_path(GtkTreeModel *tree_model, GtkTreeIter *iter)
{
GtkTreePath *path;
PacketListRecord *record;
- PacketList *packet_list;
g_return_val_if_fail(PACKETLIST_IS_LIST(tree_model), NULL);
g_return_val_if_fail(iter != NULL, NULL);
g_return_val_if_fail(iter->user_data != NULL, NULL);
- packet_list = PACKET_LIST(tree_model);
-
record = (PacketListRecord*) iter->user_data;
path = gtk_tree_path_new();
diff --git a/gtk/prefs_capture.c b/gtk/prefs_capture.c
index d61c335a06..4924b0ee2c 100644
--- a/gtk/prefs_capture.c
+++ b/gtk/prefs_capture.c
@@ -967,7 +967,6 @@ ifopts_if_liststore_add(void)
/* We have an interface list. */
/* add OS description + interface name text to ListStore */
- ifl_p = if_list;
for (ifl_p = if_list; ifl_p != NULL; ifl_p = g_list_next(ifl_p)) {
/* should never happen, but just in case */
if ((ifl_p->data) == NULL)
diff --git a/gtk/profile_dlg.c b/gtk/profile_dlg.c
index 510f26888e..8652a33abf 100644
--- a/gtk/profile_dlg.c
+++ b/gtk/profile_dlg.c
@@ -296,7 +296,6 @@ profile_apply(GtkWidget *main_w, GtkTreeView *profile_l, gboolean destroy)
/* First validate all profile names */
fl1 = g_list_first(edited_profiles);
while (fl1) {
- found = FALSE;
profile1 = (profile_def *) fl1->data;
g_strstrip(profile1->name);
if (profile_is_invalid_name(profile1->name)) {
@@ -308,7 +307,6 @@ profile_apply(GtkWidget *main_w, GtkTreeView *profile_l, gboolean destroy)
/* Then create new and rename changed */
fl1 = g_list_first(edited_profiles);
while (fl1) {
- found = FALSE;
profile1 = (profile_def *) fl1->data;
g_strstrip(profile1->name);
if (profile1->status == PROF_STAT_NEW) {
diff --git a/gtk/proto_hier_stats_dlg.c b/gtk/proto_hier_stats_dlg.c
index c75310d314..5493236251 100644
--- a/gtk/proto_hier_stats_dlg.c
+++ b/gtk/proto_hier_stats_dlg.c
@@ -144,7 +144,6 @@ fill_in_tree_node(GNode *node, gpointer data)
ph_stats_node_t *stats = node->data;
draw_info_t *di = data;
ph_stats_t *ps = di->ps;
- gboolean is_leaf;
draw_info_t child_di;
double seconds;
gchar *text[NUM_STAT_COLUMNS];
@@ -154,12 +153,6 @@ fill_in_tree_node(GNode *node, gpointer data)
GtkTreeStore *store;
GtkTreeIter new_iter;
- if (g_node_n_children(node) > 0) {
- is_leaf = FALSE;
- } else {
- is_leaf = TRUE;
- }
-
seconds = ps->last_time - ps->first_time;
percent = (float) PCT(stats->num_pkts_total, ps->tot_packets);
diff --git a/gtk/rtp_stream_dlg.c b/gtk/rtp_stream_dlg.c
index 6135740ec0..37a6d4d238 100644
--- a/gtk/rtp_stream_dlg.c
+++ b/gtk/rtp_stream_dlg.c
@@ -275,7 +275,6 @@ rtpstream_on_findrev (GtkButton *button _U_,
}
start_row = gtk_clist_find_row_from_data(GTK_CLIST(clist), pstream);
- row = start_row+1;
for (row=start_row+1;
(pstream = gtk_clist_get_row_data(GTK_CLIST(clist), row));
diff --git a/gtk/supported_protos_dlg.c b/gtk/supported_protos_dlg.c
index a1a0cc1530..6c0b6d38e9 100644
--- a/gtk/supported_protos_dlg.c
+++ b/gtk/supported_protos_dlg.c
@@ -236,7 +236,6 @@ static void set_supported_text(GtkWidget *w, supported_type_t type)
if ((len = (int) strlen(filter_name)) > filter_namel)
filter_namel = len;
}
- maxlen = namel + short_namel + filter_namel;
len = g_snprintf(buffer, BUFF_LEN, proto_supported, count);
insert_text(w, buffer, len);
@@ -254,7 +253,7 @@ static void set_supported_text(GtkWidget *w, supported_type_t type)
-short_namel, short_name,
-namel, name,
-filter_namel, filter_name);
- insert_text(w, buffer, (int) strlen(buffer));
+ insert_text(w, buffer, len);
}
break;
@@ -327,7 +326,7 @@ static void set_supported_text(GtkWidget *w, supported_type_t type)
-maxlen2, hfinfo->name,
type_name);
}
- insert_text(w, buffer, (int) strlen(buffer));
+ insert_text(w, buffer, len);
}
}
len = g_snprintf(buffer, BUFF_LEN, "\n-- Total %d fields\n", fcount);