summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndersBroman <anders.broman@ericsson.com>2015-07-02 12:19:02 +0200
committerAnders Broman <a.broman58@gmail.com>2015-07-02 15:28:03 +0000
commit9421af309bcb02a89c7a7d14dcc095afa7c56604 (patch)
tree0f9ebcaf13731de2bd2c22ebe38ca1fec3e29d1b
parent523ce152e82357f67b3cf72b061f92d8dbcc2396 (diff)
downloadwireshark-9421af309bcb02a89c7a7d14dcc095afa7c56604.tar.gz
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 <a.broman58@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r--caputils/airpcap_loader.c6
-rw-r--r--caputils/airpcap_loader.h2
-rw-r--r--ui/gtk/airpcap_dlg.c24
-rw-r--r--ui/gtk/airpcap_gui_utils.c4
-rw-r--r--ui/gtk/capture_dlg.c8
-rw-r--r--ui/gtk/capture_if_dlg.c4
-rw-r--r--ui/gtk/main.c6
-rw-r--r--ui/gtk/main_airpcap_toolbar.c14
-rw-r--r--ui/gtk/main_welcome.c2
-rw-r--r--ui/gtk/prefs_dlg.c2
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; i<n_adapters; i++)
{
- curr_adapter = (airpcap_if_info_t*)g_list_nth_data(airpcap_if_list,i);
+ curr_adapter = (airpcap_if_info_t*)g_list_nth_data(g_airpcap_if_list,i);
current_adapter_keys = get_airpcap_device_keys(curr_adapter);
merged_list_tmp = merged_list;
@@ -2341,7 +2341,7 @@ on_merge_bt_clicked (GtkWidget* button _U_, gpointer user_data)
}
/* Set up this new list as default for Wireshark and Adapters... */
- airpcap_save_decryption_keys(merged_list,airpcap_if_list);
+ airpcap_save_decryption_keys(merged_list,g_airpcap_if_list);
free_key_list(wireshark_keys);
free_key_list(driver_keys);
@@ -2380,7 +2380,7 @@ on_keep_bt_clicked (GtkWidget *button _U_, gpointer user_data)
merged_keys = merge_key_list(wireshark_keys,NULL);
/* Set up this new list as default for Wireshark and Adapters... */
- airpcap_save_decryption_keys(merged_keys,airpcap_if_list);
+ airpcap_save_decryption_keys(merged_keys,g_airpcap_if_list);
/* Free the memory */
free_key_list(wireshark_keys);
@@ -2421,7 +2421,7 @@ on_import_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);
wireshark_keys = get_wireshark_keys();
@@ -2433,7 +2433,7 @@ on_import_bt_clicked (GtkWidget* button _U_, gpointer user_data)
/* NOW wireshark_keys IS no more needed... at the end, we will have to free it! */
for (i = 0; i<n_adapters; i++)
{
- curr_adapter = (airpcap_if_info_t*)g_list_nth_data(airpcap_if_list,i);
+ curr_adapter = (airpcap_if_info_t*)g_list_nth_data(g_airpcap_if_list,i);
current_adapter_keys = get_airpcap_device_keys(curr_adapter);
merged_list_tmp = merged_list;
@@ -2443,7 +2443,7 @@ on_import_bt_clicked (GtkWidget* button _U_, gpointer user_data)
}
/* Set up this new list as default for Wireshark and Adapters... */
- airpcap_save_decryption_keys(merged_list,airpcap_if_list);
+ airpcap_save_decryption_keys(merged_list,g_airpcap_if_list);
free_key_list(wireshark_keys);
free_key_list(driver_keys);
diff --git a/ui/gtk/airpcap_gui_utils.c b/ui/gtk/airpcap_gui_utils.c
index 14d96d5f3f..50a83eb741 100644
--- a/ui/gtk/airpcap_gui_utils.c
+++ b/ui/gtk/airpcap_gui_utils.c
@@ -1529,13 +1529,13 @@ set_airpcap_decryption(gboolean on_off)
airpcap_if_info_free(fake_if_info);
- n = g_list_length(airpcap_if_list);
+ n = g_list_length(g_airpcap_if_list);
/* Set to FALSE the decryption for all the adapters */
/* Apply this change to all the adapters !!! */
for(i = 0; i < n; i++)
{
- curr_if = (airpcap_if_info_t*)g_list_nth_data(airpcap_if_list,i);
+ curr_if = (airpcap_if_info_t*)g_list_nth_data(g_airpcap_if_list,i);
if (curr_if != NULL)
{
diff --git a/ui/gtk/capture_dlg.c b/ui/gtk/capture_dlg.c
index 1f3469c163..80c848ef4f 100644
--- a/ui/gtk/capture_dlg.c
+++ b/ui/gtk/capture_dlg.c
@@ -2985,7 +2985,7 @@ void options_interface_cb(GtkTreeView *view, GtkTreePath *path, GtkTreeViewColum
* confuse users, so that they ask why this is grayed out on
* their non-Windows machine and ask how to enable it.
*/
- airpcap_if_selected = get_airpcap_if_from_name(airpcap_if_list, device.name);
+ airpcap_if_selected = get_airpcap_if_from_name(g_airpcap_if_list, device.name);
if (airpcap_if_selected != NULL) {
advanced_bt = gtk_button_new_with_label("Wireless Settings");
@@ -4604,13 +4604,13 @@ capture_prep_cb(GtkWidget *w _U_, gpointer d _U_)
/* update airpcap interface list */
/* load the airpcap interfaces */
- airpcap_if_list = get_airpcap_interface_list(&err, &err_str);
+ g_airpcap_if_list = get_airpcap_interface_list(&err, &err_str);
/* If we don't get a list don't do any thing.
* If the error is AIRPCAP_NOT_LOADED it avoids an unnecessary rescan of the packet list
* ( see airpcap_loader.h for error codes).
*/
- if (airpcap_if_list == NULL) {
+ if (g_airpcap_if_list == NULL) {
if (err == CANT_GET_AIRPCAP_INTERFACE_LIST) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", err_str);
g_free(err_str);
@@ -4620,7 +4620,7 @@ capture_prep_cb(GtkWidget *w _U_, gpointer d _U_)
/* XXXX update_decryption_mode_list() triggers a rescan, should only be done if the mode is changed */
update_decryption_mode_list(decryption_cb);
/* select the first as default (THIS SHOULD BE CHANGED) */
- airpcap_if_active = airpcap_get_default_if(airpcap_if_list);
+ airpcap_if_active = airpcap_get_default_if(g_airpcap_if_list);
}
#endif
diff --git a/ui/gtk/capture_if_dlg.c b/ui/gtk/capture_if_dlg.c
index 56ee984131..c4d40e5936 100644
--- a/ui/gtk/capture_if_dlg.c
+++ b/ui/gtk/capture_if_dlg.c
@@ -222,7 +222,7 @@ capture_do_cb(GtkWidget *capture_bt_arg _U_, gpointer if_data _U_)
if_array = g_array_remove_index(if_array, ifs);
g_array_insert_val(if_array, ifs, data);
#ifdef HAVE_AIRPCAP
- airpcap_if_active = get_airpcap_if_from_name(airpcap_if_list, gtk_label_get_text(GTK_LABEL(data.device_lb)));
+ airpcap_if_active = get_airpcap_if_from_name(g_airpcap_if_list, gtk_label_get_text(GTK_LABEL(data.device_lb)));
airpcap_if_selected = airpcap_if_active;
#endif
}
@@ -876,7 +876,7 @@ capture_if_cb(GtkWidget *w _U_, gpointer d _U_)
/* If no airpcap interface is present, gray everything */
if (airpcap_if_active == NULL) {
- if (airpcap_if_list == NULL) {
+ if (g_airpcap_if_list == NULL) {
/*No airpcap device found */
airpcap_enable_toolbar_widgets(wireless_tb,FALSE);
} else {
diff --git a/ui/gtk/main.c b/ui/gtk/main.c
index 4244b9a5a7..32d2dbe05f 100644
--- a/ui/gtk/main.c
+++ b/ui/gtk/main.c
@@ -2234,9 +2234,9 @@ DIAG_ON(cast-qual)
switch (airpcap_dll_ret_val) {
case AIRPCAP_DLL_OK:
/* load the airpcap interfaces */
- airpcap_if_list = get_airpcap_interface_list(&err, &err_str);
+ g_airpcap_if_list = get_airpcap_interface_list(&err, &err_str);
- 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){
if (err == CANT_GET_AIRPCAP_INTERFACE_LIST && err_str != NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", "Failed to open Airpcap Adapters.");
g_free(err_str);
@@ -2246,7 +2246,7 @@ DIAG_ON(cast-qual)
} else {
/* select the first ad default (THIS SHOULD BE CHANGED) */
- airpcap_if_active = airpcap_get_default_if(airpcap_if_list);
+ airpcap_if_active = airpcap_get_default_if(g_airpcap_if_list);
}
break;
#if 0
diff --git a/ui/gtk/main_airpcap_toolbar.c b/ui/gtk/main_airpcap_toolbar.c
index 647f9cc318..dae692134c 100644
--- a/ui/gtk/main_airpcap_toolbar.c
+++ b/ui/gtk/main_airpcap_toolbar.c
@@ -118,13 +118,13 @@ airpcap_toolbar_encryption_cb(GtkWidget *entry _U_, gpointer user_data _U_)
return;
}
- if (!(airpcap_if_list == NULL)) {
- n = g_list_length(airpcap_if_list);
+ if (!(g_airpcap_if_list == NULL)) {
+ n = g_list_length(g_airpcap_if_list);
/* The same kind of settings should be propagated to all the adapters */
/* Apply this change to all the adapters !!! */
for(i = 0; i < n; i++) {
- curr_if = (airpcap_if_info_t*)g_list_nth_data(airpcap_if_list,i);
+ curr_if = (airpcap_if_info_t*)g_list_nth_data(g_airpcap_if_list,i);
if( (curr_if != NULL) && (curr_if != airpcap_if_selected) ) {
ad = airpcap_if_open(curr_if->name, 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);