[network-manager-openvpn/nm-1-0] properties: avoid compiler warning about comparing unsigned int



commit 87aa9ec5f25dd9646842daad11e61d69db0ac513
Author: Thomas Haller <thaller redhat com>
Date:   Wed Sep 21 12:01:45 2016 +0200

    properties: avoid compiler warning about comparing unsigned int
    
        auth-helpers.c:1728:60: error: comparison of unsigned expression < 0 is always false 
[-Werror,-Wtautological-compare]
                        gtk_combo_box_set_active (GTK_COMBO_BOX (widget), active < 0 ? 0 : active);
                                                                          ~~~~~~ ^ ~

 properties/auth-helpers.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/properties/auth-helpers.c b/properties/auth-helpers.c
index 43ab6f7..c8d8305 100644
--- a/properties/auth-helpers.c
+++ b/properties/auth-helpers.c
@@ -1725,7 +1725,7 @@ advanced_dialog_new (GHashTable *hash, const char *contype)
 
                gtk_combo_box_set_model (GTK_COMBO_BOX (widget), GTK_TREE_MODEL (store));
                g_object_unref (store);
-               gtk_combo_box_set_active (GTK_COMBO_BOX (widget), active < 0 ? 0 : active);
+               gtk_combo_box_set_active (GTK_COMBO_BOX (widget), active);
 
                value = g_hash_table_lookup (hash, NM_OPENVPN_KEY_TA);
                if (value && strlen (value)) {


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