mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 22:10:09 +01:00
clients: fix compilation without NM_MORE_ASSERTS
It would render _assert_format_int() unused and warn.
Fixes: 466bf2f633
This commit is contained in:
parent
ed7ee64d4e
commit
2dc0ee29f6
1 changed files with 3 additions and 4 deletions
|
|
@ -252,7 +252,7 @@ nm_editor_utils_get_connection_type_list (void)
|
|||
return list;
|
||||
}
|
||||
|
||||
static void
|
||||
static gboolean
|
||||
_assert_format_int (const char *format)
|
||||
{
|
||||
g_assert (format);
|
||||
|
|
@ -260,6 +260,7 @@ _assert_format_int (const char *format)
|
|||
g_assert (format);
|
||||
g_assert (!strchr (format, '%'));
|
||||
g_assert (format[1] == 'd');
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static char *
|
||||
|
|
@ -271,9 +272,7 @@ get_available_connection_name (const char *format,
|
|||
char *cname = NULL;
|
||||
int i = 0;
|
||||
|
||||
#if NM_MORE_ASSERTS
|
||||
_assert_format_int (format);
|
||||
#endif
|
||||
nm_assert (_assert_format_int (format));
|
||||
|
||||
conns = nm_client_get_connections (client);
|
||||
for (i = 0; i < conns->len; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue