From 9380f962a2d694183b9ce20830b5943d3ea7b7fb Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Mon, 16 Apr 2012 07:59:48 +0000 Subject: Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang svn path=/trunk/; revision=42090 --- ui/gtk/airpcap_dlg.c | 5 ----- ui/gtk/airpcap_gui_utils.c | 16 +--------------- 2 files changed, 1 insertion(+), 20 deletions(-) (limited to 'ui') diff --git a/ui/gtk/airpcap_dlg.c b/ui/gtk/airpcap_dlg.c index 736e6135b7..e463f7823a 100644 --- a/ui/gtk/airpcap_dlg.c +++ b/ui/gtk/airpcap_dlg.c @@ -2479,20 +2479,15 @@ on_keep_bt_clicked (GtkWidget *button _U_, gpointer user_data) GtkListStore *key_list_store=NULL; GList* wireshark_keys=NULL; - guint n_wireshark_keys = 0; GList* merged_keys=NULL; - guint n_total_keys=0; - keys_check_w = GTK_WIDGET(user_data); key_management_w = g_object_get_data(G_OBJECT(keys_check_w),AIRPCAP_CHECK_WINDOW_KEY); /* Retrieve Wireshark keys */ wireshark_keys = get_wireshark_keys(); - n_wireshark_keys = g_list_length(wireshark_keys); - n_total_keys += n_wireshark_keys; merged_keys = merge_key_list(wireshark_keys,NULL); diff --git a/ui/gtk/airpcap_gui_utils.c b/ui/gtk/airpcap_gui_utils.c index a31322f14a..1d6ce032eb 100644 --- a/ui/gtk/airpcap_gui_utils.c +++ b/ui/gtk/airpcap_gui_utils.c @@ -278,8 +278,6 @@ airpcap_fill_key_list(GtkListStore *key_list_store) decryption_key_t* curr_key = NULL; GtkTreeIter iter; - n = 0; - fake_if_info = airpcap_driver_fake_if_info_new(); /* We can retrieve the driver's key list (i.e. we have the right .dll)*/ @@ -716,11 +714,6 @@ airpcap_add_keys_to_driver_from_list(GtkListStore *key_list_store, airpcap_if_in keys_in_list = gtk_tree_model_iter_n_children(model, NULL); - /* - * Save the encryption keys, if we have any of them - */ - KeysCollectionSize = 0; - /* * Calculate the size of the keys collection */ @@ -801,7 +794,6 @@ airpcap_read_and_save_decryption_keys_from_list_store(GtkListStore* key_list_sto gboolean items_left; gint if_n = 0; gint i = 0; - gint r = 0; airpcap_if_info_t* curr_if = NULL; airpcap_if_info_t* fake_info_if = NULL; GList* key_list=NULL; @@ -859,7 +851,7 @@ airpcap_read_and_save_decryption_keys_from_list_store(GtkListStore* key_list_sto g_free(tmp_ssid); } - r = save_wlan_wireshark_wep_keys(key_list); + save_wlan_wireshark_wep_keys(key_list); /* The key_list has been freed!!! */ /* @@ -910,7 +902,6 @@ airpcap_check_decryption_keys(GList* if_list) gint i = 0; gint n_adapters_keys = 0; gint n_driver_keys = 0; - gint n_wireshark_keys = 0; airpcap_if_info_t* curr_if = NULL; GList* wireshark_key_list; @@ -931,7 +922,6 @@ airpcap_check_decryption_keys(GList* if_list) /* Get Wireshark preferences keys */ wireshark_key_list = get_wireshark_keys(); - n_wireshark_keys = g_list_length(wireshark_key_list); /* Retrieve AirPcap driver's keys */ driver_key_list = get_airpcap_driver_keys(); @@ -973,7 +963,6 @@ airpcap_load_decryption_keys(GList* if_list) { gint if_n = 0; gint i = 0; - airpcap_if_info_t* curr_if = NULL; if(if_list == NULL) return; @@ -981,7 +970,6 @@ airpcap_load_decryption_keys(GList* if_list) for(i = 0; i < if_n; i++) { - curr_if = (airpcap_if_info_t*)g_list_nth_data(if_list,i); load_wlan_driver_wep_keys(); } } @@ -994,7 +982,6 @@ void airpcap_save_decryption_keys(GList* key_list, GList* adapters_list) { gint if_n = 0; - gint key_n = 0; gint i = 0; airpcap_if_info_t* curr_if = NULL; GList* empty_key_list = NULL; @@ -1002,7 +989,6 @@ airpcap_save_decryption_keys(GList* key_list, GList* adapters_list) if( (key_list == NULL) || (adapters_list == NULL)) return; if_n = g_list_length(adapters_list); - key_n = g_list_length(key_list); /* Set the driver's global list of keys. */ write_wlan_driver_wep_keys_to_registry(key_list); -- cgit v1.2.3