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

@@ -348,7 +348,10 @@ mechanism_client_initiate (GDBusAuthMechanism *mechanism,
*out_initial_response_len = strlen (initial_response);
#elif defined(G_OS_WIN32)
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic warning "-Wcpp"
#warning Dont know how to send credentials on this OS. The EXTERNAL D-Bus authentication mechanism will not work.
#pragma GCC diagnostic pop
#endif
m->priv->state = G_DBUS_AUTH_MECHANISM_STATE_REJECTED;
#endif