mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-02 21:40:13 +01:00
test: fix compiler warning in g_test_assert_expected_messages_internal()
-Wformat of gcc determines that the string arguments are NULL. Fixes:373d09b042(cherry picked from commit0aca44c857)
This commit is contained in:
parent
fd10ed1e71
commit
636c8592ce
1 changed files with 7 additions and 2 deletions
|
|
@ -445,12 +445,17 @@ nmtst_is_debug (void)
|
|||
#undef g_test_assert_expected_messages_internal
|
||||
#define g_test_assert_expected_messages_internal(domain, file, line, func) \
|
||||
G_STMT_START { \
|
||||
const char *_domain = (domain); \
|
||||
const char *_file = (file); \
|
||||
const char *_func = (func); \
|
||||
int _line = (line); \
|
||||
\
|
||||
g_assert (nmtst_initialized ()); \
|
||||
if (__nmtst_internal.assert_logging && __nmtst_internal.no_expect_message) \
|
||||
g_debug ("nmtst: assert-logging: g_test_assert_expected_messages(%s, %s:%d, %s)", domain, file, line, func); \
|
||||
g_debug ("nmtst: assert-logging: g_test_assert_expected_messages(%s, %s:%d, %s)", _domain?:"", _file?:"", _line, _func?:""); \
|
||||
\
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
|
||||
g_test_assert_expected_messages_internal (domain, file, line, func); \
|
||||
g_test_assert_expected_messages_internal (_domain, _file, _line, _func); \
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS \
|
||||
} G_STMT_END
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue