diff options
-rw-r--r-- | gtk/airpcap_dlg.c | 12 | ||||
-rw-r--r-- | gtk/airpcap_gui_utils.c | 8 | ||||
-rw-r--r-- | gtk/main_airpcap_toolbar.c | 2 |
3 files changed, 9 insertions, 13 deletions
diff --git a/gtk/airpcap_dlg.c b/gtk/airpcap_dlg.c index 8231f6e3c4..b0552d0995 100644 --- a/gtk/airpcap_dlg.c +++ b/gtk/airpcap_dlg.c @@ -181,7 +181,7 @@ on_key_ls_click_column(GtkWidget *widget _U_, * Callback for the crc checkbox */ static void -on_fcs_ck_toggled(GtkWidget *w, gpointer user_data) +on_fcs_ck_toggled(GtkWidget *w _U_, gpointer user_data _U_) { if (airpcap_if_selected != NULL) @@ -741,7 +741,7 @@ on_add_key_ok_bt_clicked(GtkWidget *widget _U_, gpointer data _U_) /* * XXX - Maybe we need some check on the characters? I'm not sure if only standard ASCII are ok... */ - if ( ((new_ssid_string->len) > WPA_SSID_MAX_CHAR_SIZE) || ((new_ssid_string->len) < WPA_SSID_MIN_CHAR_SIZE)) + if ((new_ssid_string->len) > WPA_SSID_MAX_CHAR_SIZE) { simple_dialog(ESD_TYPE_ERROR,ESD_BTN_OK,"SSID key size out of range!\nValid SSID size range is %d-%d ASCII characters (%d-%d bits).",WPA_SSID_MIN_CHAR_SIZE,WPA_SSID_MAX_CHAR_SIZE,WPA_SSID_MIN_BIT_SIZE,WPA_SSID_MAX_BIT_SIZE); @@ -949,7 +949,7 @@ on_edit_key_ok_bt_clicked(GtkWidget *widget _U_, gpointer data _U_) /* * XXX - Maybe we need some check on the characters? I'm not sure if only standard ASCII are ok... */ - if ( ((new_ssid_string->len) > WPA_SSID_MAX_CHAR_SIZE) || ((new_ssid_string->len) < WPA_SSID_MIN_CHAR_SIZE)) + if ((new_ssid_string->len) > WPA_SSID_MAX_CHAR_SIZE) { simple_dialog(ESD_TYPE_ERROR,ESD_BTN_OK,"SSID key size out of range!\nValid SSID size range is %d-%d ASCII characters (%d-%d bits).",WPA_SSID_MIN_CHAR_SIZE,WPA_SSID_MAX_CHAR_SIZE,WPA_SSID_MIN_BIT_SIZE,WPA_SSID_MAX_BIT_SIZE); @@ -1030,7 +1030,7 @@ on_edit_key_ok_bt_clicked(GtkWidget *widget _U_, gpointer data _U_) * Callback for the 'Add Key' button. */ void -on_add_new_key_bt_clicked(GtkWidget *button, gpointer data _U_) +on_add_new_key_bt_clicked(GtkWidget *button _U_, gpointer data _U_) { GtkWidget *add_key_window; GtkWidget *add_frame; @@ -1598,7 +1598,7 @@ on_move_key_down_bt_clicked(GtkWidget *button _U_, gpointer data) /* Turns the decryption on or off */ void -on_decryption_mode_cb_changed(GtkWidget *cb, gpointer data) +on_decryption_mode_cb_changed(GtkWidget *cb, gpointer data _U_) { gint cur_active; @@ -2545,8 +2545,6 @@ on_key_management_ok_bt_clicked(GtkWidget *button, gpointer data) void on_key_management_cancel_bt_clicked(GtkWidget *button _U_, gpointer data) { - PAirpcapHandle ad = NULL; - /* Retrieve object data */ GtkWidget *key_management_w; GtkWidget *cancel_bt; diff --git a/gtk/airpcap_gui_utils.c b/gtk/airpcap_gui_utils.c index 471c6d716f..a42ae0e0b0 100644 --- a/gtk/airpcap_gui_utils.c +++ b/gtk/airpcap_gui_utils.c @@ -57,6 +57,7 @@ /* Controls the releay of settings back to the adapter. */ gboolean change_airpcap_settings = FALSE; +#if 0 /* * Used to retrieve a string containing a list of all the channels * on which at least one adapter is capturing. This is true @@ -96,6 +97,7 @@ airpcap_get_all_channels_list(airpcap_if_info_t* if_info) g_string_free(freq_str, FALSE); return frequencies; } +#endif /* * Set up the airpcap toolbar for the new capture interface @@ -161,7 +163,6 @@ airpcap_set_toolbar_start_capture(airpcap_if_info_t* if_info) change_airpcap_settings = FALSE; if (if_info->pSupportedChannels != NULL && if_info->numSupportedChannels > 0){ guint i = 0; - GList *channel_list = NULL; for (; i<if_info->numSupportedChannels; i++){ gtk_combo_box_append_text(GTK_COMBO_BOX(toolbar_channel_cb), ieee80211_mhz_to_str(if_info->pSupportedChannels[i].Frequency)); @@ -258,7 +259,6 @@ airpcap_set_toolbar_stop_capture(airpcap_if_info_t* if_info) change_airpcap_settings = FALSE; if (if_info->pSupportedChannels != NULL && if_info->numSupportedChannels > 0){ guint i = 0; - GList *channel_list = NULL; for (; i<if_info->numSupportedChannels; i++){ gtk_combo_box_append_text(GTK_COMBO_BOX(toolbar_channel_cb), ieee80211_mhz_to_str(if_info->pSupportedChannels[i].Frequency)); @@ -675,7 +675,7 @@ airpcap_update_channel_offset_combo(airpcap_if_info_t* if_info, ULONG chan_freq, gint current_offset; gint new_offset; guint i; - gint active_idx; + gint active_idx = 0; gint idx_count = -1; if (!if_info || airpcap_if_is_any(if_info) || if_info->pSupportedChannels == NULL || if_info->numSupportedChannels < 1) { @@ -731,7 +731,7 @@ airpcap_update_channel_offset_combo(airpcap_if_info_t* if_info, ULONG chan_freq, if_info->channelInfo.ExtChannel = new_offset; if (!airpcap_update_frequency_and_offset(if_info)){ - simple_dialog(ESD_TYPE_ERROR,ESD_BTN_OK,"Adapter failed to be set with the following settings: Frequency - %ld Extension Channel - %d", if_info->channelInfo.Frequency, if_info->channelInfo.ExtChannel); + simple_dialog(ESD_TYPE_ERROR,ESD_BTN_OK,"Adapter failed to be set with the following settings: Frequency - %d Extension Channel - %d", if_info->channelInfo.Frequency, if_info->channelInfo.ExtChannel); } if (idx_count < 1) { diff --git a/gtk/main_airpcap_toolbar.c b/gtk/main_airpcap_toolbar.c index 0c8ba89f4d..5fc168d85f 100644 --- a/gtk/main_airpcap_toolbar.c +++ b/gtk/main_airpcap_toolbar.c @@ -195,9 +195,7 @@ GtkWidget *airpcap_toolbar_new() GtkWidget *decryption_mode_lb; GtkWidget *decryption_mode_cb; - GList *linktype_list = NULL; GtkTooltips *airpcap_tooltips; - gint cur_chan_idx = -1; /* airpcap toolbar */ airpcap_tooltips = gtk_tooltips_new(); |