[network-manager-applet/jk/coverity: 1/2] coverity: fix UNUSED_VALUE defects found with coverity



commit f7fc5f032f73359d42027f8cae1ab474aec8373e
Author: Jiří Klimeš <jklimes redhat com>
Date:   Fri Nov 8 08:40:16 2013 +0100

    coverity: fix UNUSED_VALUE defects found with coverity

 src/applet-device-ethernet.c |    2 +-
 src/applet-dialogs.c         |    4 +---
 src/mobile-helpers.c         |    2 +-
 3 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/applet-device-ethernet.c b/src/applet-device-ethernet.c
index 30b19c8..6e1c5a3 100644
--- a/src/applet-device-ethernet.c
+++ b/src/applet-device-ethernet.c
@@ -365,7 +365,7 @@ pppoe_get_secrets (SecretsRequest *req, GError **error)
        gtk_window_set_title (GTK_WINDOW (info->dialog), _("DSL authentication"));
        gtk_window_set_modal (GTK_WINDOW (info->dialog), TRUE);
 
-       w = gtk_dialog_add_button (GTK_DIALOG (info->dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT);
+       gtk_dialog_add_button (GTK_DIALOG (info->dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT);
        w = gtk_dialog_add_button (GTK_DIALOG (info->dialog), GTK_STOCK_OK, GTK_RESPONSE_OK);
        info->ok_button = w;
 
diff --git a/src/applet-dialogs.c b/src/applet-dialogs.c
index e084c27..c717493 100644
--- a/src/applet-dialogs.c
+++ b/src/applet-dialogs.c
@@ -227,11 +227,9 @@ create_info_label_security (NMConnection *connection)
 
        connection_type = nm_setting_connection_get_connection_type (s_con);
        if (!strcmp (connection_type, NM_SETTING_WIRELESS_SETTING_NAME)) {
-               NMSettingWireless *s_wireless;
                NMSettingWirelessSecurity *s_wireless_sec;
                NMSetting8021x *s_8021x;
 
-               s_wireless = nm_connection_get_setting_wireless (connection);
                s_wireless_sec = nm_connection_get_setting_wireless_security (connection);
                s_8021x = nm_connection_get_setting_802_1x (connection);
 
@@ -957,7 +955,7 @@ applet_mobile_password_dialog_new (NMConnection *connection,
        gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
        gtk_window_set_title (GTK_WINDOW (dialog), _("Mobile broadband network password"));
 
-       w = gtk_dialog_add_button (dialog, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT);
+       gtk_dialog_add_button (dialog, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT);
        w = gtk_dialog_add_button (dialog, GTK_STOCK_OK, GTK_RESPONSE_OK);
        gtk_window_set_default (GTK_WINDOW (dialog), w);
 
diff --git a/src/mobile-helpers.c b/src/mobile-helpers.c
index adc45d9..7ffb7f0 100644
--- a/src/mobile-helpers.c
+++ b/src/mobile-helpers.c
@@ -449,7 +449,7 @@ ask_for_pin (GtkEntry **out_secret_entry)
        gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
        gtk_window_set_title (GTK_WINDOW (dialog), _("PIN code required"));
 
-       ok_button = gtk_dialog_add_button (dialog, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT);
+       gtk_dialog_add_button (dialog, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT);
        ok_button = gtk_dialog_add_button (dialog, GTK_STOCK_OK, GTK_RESPONSE_OK);
        gtk_window_set_default (GTK_WINDOW (dialog), ok_button);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]