[network-manager-openvpn] properties: fix static-assert in advanced_dialog_new()



commit 567521efbe7ceb4c046abedaa5da0b049a31d1ad
Author: Thomas Haller <thaller redhat com>
Date:   Mon Mar 12 11:23:04 2018 +0100

    properties: fix static-assert in advanced_dialog_new()
    
      properties/nm-openvpn-editor.c: In function 'advanced_dialog_new':
      /usr/include/glib-2.0/glib/gmacros.h:232:31: warning: ISO C90 forbids mixed declarations and code 
[-Wdeclaration-after-statement]
       #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, 
__COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
                                     ^
      properties/nm-openvpn-editor.c:1511:3: note: in expansion of macro 'G_STATIC_ASSERT'
         G_STATIC_ASSERT (((guint) (NMSettingSecretFlags) 0xFFFFu) == 0xFFFFu);
         ^~~~~~~~~~~~~~~
    
    Fixes: b4565c9f823bf80744c70211179243ecc8987198

 properties/nm-openvpn-editor.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/properties/nm-openvpn-editor.c b/properties/nm-openvpn-editor.c
index 37b313a..5ba33ef 100644
--- a/properties/nm-openvpn-editor.c
+++ b/properties/nm-openvpn-editor.c
@@ -1508,7 +1508,7 @@ advanced_dialog_new (GHashTable *hash, const char *contype)
                }
 
                value = g_hash_table_lookup (hash, NM_OPENVPN_KEY_HTTP_PROXY_PASSWORD"-flags");
-               G_STATIC_ASSERT (((guint) (NMSettingSecretFlags) 0xFFFFu) == 0xFFFFu);
+               G_STATIC_ASSERT_EXPR (((guint) (NMSettingSecretFlags) 0xFFFFu) == 0xFFFFu);
                pw_flags = _nm_utils_ascii_str_to_int64 (value, 10, 0, 0xFFFF, NM_SETTING_SECRET_FLAG_NONE);
        } else
                pw_flags = NM_SETTING_SECRET_FLAG_NONE;


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