ci: fix warnings and enable --werror for the mingw build

Fix various warnings regarding unused variables, duplicated
branches etc by adjusting the ifdeffery and some missing casts.

gnulib triggers -Wduplicated-branches in one of the copied files,
disable as that just makes updating the code harder.

The warning indicating missing features are made none fatal through
pragmas. They still show but don't abort the build.

https://bugzilla.gnome.org/show_bug.cgi?id=793729
This commit is contained in:
Christoph Reiter
2018-04-25 16:07:59 +02:00
committed by Christoph Reiter
parent 995f75cdd7
commit 97c28f7fe1
14 changed files with 40 additions and 14 deletions

View File

@@ -1432,11 +1432,15 @@ allocator_memalign (gsize alignment,
guint8 *amem = (guint8*) ALIGN ((gsize) mem, sys_page_size);
if (amem != mem)
i--; /* mem wasn't page aligned */
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
while (--i >= 0)
g_trash_stack_push (&compat_valloc_trash, amem + i * sys_page_size);
G_GNUC_END_IGNORE_DEPRECATIONS
}
}
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
aligned_memory = g_trash_stack_pop (&compat_valloc_trash);
G_GNUC_END_IGNORE_DEPRECATIONS
#endif
if (!aligned_memory)
errno = err;
@@ -1451,7 +1455,9 @@ allocator_memfree (gsize memsize,
free (mem);
#else
mem_assert (memsize <= sys_page_size);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
g_trash_stack_push (&compat_valloc_trash, mem);
G_GNUC_END_IGNORE_DEPRECATIONS
#endif
}