From 9421af309bcb02a89c7a7d14dcc095afa7c56604 Mon Sep 17 00:00:00 2001 From: AndersBroman Date: Thu, 2 Jul 2015 12:19:02 +0200 Subject: Try to fix: warning C6244: Local declaration of 'airpcap_if_list' hides previous declaration. Change-Id: Id0c3b74ac52c427d9c1efdf749dc410bc5bb450f Reviewed-on: https://code.wireshark.org/review/9460 Petri-Dish: Anders Broman Reviewed-by: Anders Broman --- caputils/airpcap_loader.c | 6 +++--- caputils/airpcap_loader.h | 2 +- ui/gtk/airpcap_dlg.c | 24 ++++++++++++------------ ui/gtk/airpcap_gui_utils.c | 4 ++-- ui/gtk/capture_dlg.c | 8 ++++---- ui/gtk/capture_if_dlg.c | 4 ++-- ui/gtk/main.c | 6 +++--- ui/gtk/main_airpcap_toolbar.c | 14 +++++++------- ui/gtk/main_welcome.c | 2 +- ui/gtk/prefs_dlg.c | 2 +- 10 files changed, 36 insertions(+), 36 deletions(-) diff --git a/caputils/airpcap_loader.c b/caputils/airpcap_loader.c index 61818ba0f5..299cac1483 100644 --- a/caputils/airpcap_loader.c +++ b/caputils/airpcap_loader.c @@ -98,7 +98,7 @@ static AirpcapGetDeviceChannelExHandler g_PAirpcapGetDeviceChannelEx; static AirpcapGetDeviceSupportedChannelsHandler g_PAirpcapGetDeviceSupportedChannels; /* Airpcap interface list */ -GList *airpcap_if_list = NULL; +GList *g_airpcap_if_list = NULL; /* Airpcap current selected interface */ airpcap_if_info_t *airpcap_if_selected = NULL; @@ -601,14 +601,14 @@ airpcap_driver_fake_if_info_new(void) airpcap_if_info_t *fake_if_info = NULL; /* Maybe for some reason no airpcap adapter is found */ - if (airpcap_if_list == NULL) + if (g_airpcap_if_list == NULL) return NULL; /* * Retrieve the first AirPcap adapter available. If no interface is found, * it is not possible to retrieve the driver's settings, so return NULL. */ - if_info = (airpcap_if_info_t *)g_list_nth_data(airpcap_if_list,0); + if_info = (airpcap_if_info_t *)g_list_nth_data(g_airpcap_if_list,0); if (if_info == NULL) return NULL; diff --git a/caputils/airpcap_loader.h b/caputils/airpcap_loader.h index 9eea487b02..034f732de1 100644 --- a/caputils/airpcap_loader.h +++ b/caputils/airpcap_loader.h @@ -135,7 +135,7 @@ typedef struct { } keys_cb_data_t; /* Airpcap interface list */ -extern GList *airpcap_if_list; +extern GList *g_airpcap_if_list; /* Airpcap current selected interface */ extern airpcap_if_info_t *airpcap_if_selected; diff --git a/ui/gtk/airpcap_dlg.c b/ui/gtk/airpcap_dlg.c index fb6987914b..6d85dea611 100644 --- a/ui/gtk/airpcap_dlg.c +++ b/ui/gtk/airpcap_dlg.c @@ -526,7 +526,7 @@ on_key_management_apply_bt_clicked(GtkWidget *button _U_, gpointer data) g_free(decryption_mode_string); /* Save the configuration */ - airpcap_read_and_save_decryption_keys_from_list_store(key_list_store,airpcap_if_selected,airpcap_if_list); /* This will save the keys for every adapter */ + airpcap_read_and_save_decryption_keys_from_list_store(key_list_store,airpcap_if_selected,g_airpcap_if_list); /* This will save the keys for every adapter */ /* The update will make redissect al the packets... no need to do it here again */ update_decryption_mode(toolbar_cb); @@ -1412,7 +1412,7 @@ update_decryption_mode_list(GtkWidget *cb) gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(cb), AIRPCAP_DECRYPTION_TYPE_STRING_NONE); gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(cb), AIRPCAP_DECRYPTION_TYPE_STRING_WIRESHARK); - if (airpcap_if_list != NULL && g_list_length(airpcap_if_list) > 0) + if (g_airpcap_if_list != NULL && g_list_length(g_airpcap_if_list) > 0) { gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(cb), AIRPCAP_DECRYPTION_TYPE_STRING_AIRPCAP); } @@ -1537,7 +1537,7 @@ on_advanced_cancel_bt_clicked(GtkWidget *button _U_, gpointer data) /* Retrieve the GUI object pointers */ airpcap_advanced_w = GTK_WIDGET(data); - /* Stop blinking ALL leds (go through the airpcap_if_list) */ + /* Stop blinking ALL leds (go through the g_airpcap_if_list) */ if (airpcap_if_selected != NULL) { ad = airpcap_if_open(airpcap_if_selected->name, ebuf); @@ -2250,14 +2250,14 @@ display_airpcap_key_management_cb(GtkWidget *w _U_, gpointer data) * This will read the decryption keys from the preferences file, and will store * them into the registry... */ - if (!airpcap_check_decryption_keys(airpcap_if_list)) + if (!airpcap_check_decryption_keys(g_airpcap_if_list)) { /* Ask the user what to do ...*/ airpcap_keys_check_w(key_management_w,NULL); } else /* Keys from lists are equals, or Wireshark has got no keys */ { - airpcap_load_decryption_keys(airpcap_if_list); + airpcap_load_decryption_keys(g_airpcap_if_list); airpcap_fill_key_list(key_list_store); /* At the end, so that it appears completely all together ... */ gtk_widget_show (key_management_w); @@ -2316,7 +2316,7 @@ on_merge_bt_clicked (GtkWidget* button _U_, gpointer user_data) key_management_w = (GtkWidget *)g_object_get_data(G_OBJECT(keys_check_w),AIRPCAP_CHECK_WINDOW_KEY); - n_adapters = g_list_length(airpcap_if_list); + n_adapters = g_list_length(g_airpcap_if_list); /* Retrieve Wireshark keys */ wireshark_keys = get_wireshark_keys(); @@ -2331,7 +2331,7 @@ on_merge_bt_clicked (GtkWidget* button _U_, gpointer user_data) /* NOW wireshark_keys and driver_keys ARE no more needed... at the end, we will have to free them! */ for (i = 0; iname, ebuf); @@ -343,7 +343,7 @@ GtkWidget *airpcap_toolbar_new(void) /* If no airpcap interface is present, gray everything */ if(airpcap_if_active == NULL) { - if(airpcap_if_list == NULL || g_list_length(airpcap_if_list) == 0) { + if(g_airpcap_if_list == NULL || g_list_length(g_airpcap_if_list) == 0) { /* No airpcap device found */ airpcap_enable_toolbar_widgets(lcl_wireless_tb, FALSE); /* recent.airpcap_toolbar_show = TRUE; */ @@ -376,13 +376,13 @@ void airpcap_toolbar_show(GtkWidget *lcl_wireless_tb _U_) * This will read the decryption keys from the preferences file, and will * store them into the registry... */ - if(airpcap_if_list != NULL && g_list_length(airpcap_if_list) > 0){ - if (!airpcap_check_decryption_keys(airpcap_if_list)) { + if(g_airpcap_if_list != NULL && g_list_length(g_airpcap_if_list) > 0){ + if (!airpcap_check_decryption_keys(g_airpcap_if_list)) { /* Ask the user what to do ...*/ airpcap_keys_check_w(NULL,NULL); } else { /* Keys from lists are equals, or Wireshark has got no keys */ - airpcap_load_decryption_keys(airpcap_if_list); + airpcap_load_decryption_keys(g_airpcap_if_list); } } diff --git a/ui/gtk/main_welcome.c b/ui/gtk/main_welcome.c index 345cf7314e..5f6977b696 100644 --- a/ui/gtk/main_welcome.c +++ b/ui/gtk/main_welcome.c @@ -1195,7 +1195,7 @@ capture_if_start(GtkWidget *w _U_, gpointer data _U_) #ifdef HAVE_AIRPCAP /* TODO: don't let it depend on interface_opts */ for (i = 0; i < global_capture_opts.all_ifaces->len; i++) { device = g_array_index(global_capture_opts.all_ifaces, interface_t, i); - airpcap_if_active = get_airpcap_if_from_name(airpcap_if_list, device.name); + airpcap_if_active = get_airpcap_if_from_name(g_airpcap_if_list, device.name); airpcap_if_selected = airpcap_if_active; if (airpcap_if_selected) { break; diff --git a/ui/gtk/prefs_dlg.c b/ui/gtk/prefs_dlg.c index 32b05363f0..42f9fcae2f 100644 --- a/ui/gtk/prefs_dlg.c +++ b/ui/gtk/prefs_dlg.c @@ -1446,7 +1446,7 @@ prefs_main_ok_cb(GtkWidget *ok_bt _U_, gpointer parent_w) * Load the Wireshark decryption keys (just set) and save * the changes to the adapters' registry */ - airpcap_load_decryption_keys(airpcap_if_list); + airpcap_load_decryption_keys(g_airpcap_if_list); #endif prefs_main_apply_all((GtkWidget *)parent_w, must_redissect); -- cgit v1.2.1