gio: Fix various compiler warnings when compiling with G_DISABLE_ASSERT

Mostly unused variables which are only used in a g_assert() call
otherwise.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #1708
This commit is contained in:
Philip Withnall
2019-03-05 12:22:51 +00:00
parent 9ce76b97f1
commit 1b50643c99
11 changed files with 22 additions and 10 deletions

View File

@@ -648,8 +648,10 @@ key_state_serialise (KeyState *state)
else
{
GVariantBuilder builder;
gboolean checked G_GNUC_UNUSED /* when compiling with G_DISABLE_ASSERT */;
g_assert (key_state_check (state, NULL));
checked = key_state_check (state, NULL);
g_assert (checked);
g_variant_builder_init (&builder, G_VARIANT_TYPE_TUPLE);