[gobject-introspection/msys-werror] ci: enable -Werror for msys2+meson



commit 295dcbd57c40d530abbc791cb5c1da15dea45d82
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Tue Jan 1 18:06:47 2019 +0100

    ci: enable -Werror for msys2+meson

 .gitlab-ci/test-msys2-meson.sh |  1 +
 girepository/cmph/meson.build  |  1 +
 girepository/girepository.c    |  2 ++
 giscanner/scannerlexer.l       | 15 +++++++++------
 4 files changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/.gitlab-ci/test-msys2-meson.sh b/.gitlab-ci/test-msys2-meson.sh
index e2230e2a..52c31814 100644
--- a/.gitlab-ci/test-msys2-meson.sh
+++ b/.gitlab-ci/test-msys2-meson.sh
@@ -37,6 +37,7 @@ export PATH="$HOME/.local/bin:$PATH"
 # FIXME: https://github.com/Alexpux/MINGW-packages/pull/4064
 # Passing the full interpreter path works around the issue
 PYTHON="$(which python3)"
+export CFLAGS="-Werror"
 meson -Dcairo=true -Dpython="${PYTHON}" --buildtype debug _build
 cd _build
 ninja
diff --git a/girepository/cmph/meson.build b/girepository/cmph/meson.build
index 6b515241..d7b1e423 100644
--- a/girepository/cmph/meson.build
+++ b/girepository/cmph/meson.build
@@ -38,6 +38,7 @@ custom_c_args = cc.get_supported_arguments([
   '-Wno-unused-parameter',
   '-Wno-cast-align',
   '-Wno-unused-function',
+  '-Wno-return-type',
 ])
 cmph = static_library('cmph',
   sources: cmph_sources,
diff --git a/girepository/girepository.c b/girepository/girepository.c
index 8bc49eb1..e262d3e8 100644
--- a/girepository/girepository.c
+++ b/girepository/girepository.c
@@ -76,6 +76,8 @@ static HMODULE girepository_dll = NULL;
 
 #ifdef DLL_EXPORT
 
+BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved);
+
 BOOL WINAPI
 DllMain (HINSTANCE hinstDLL,
         DWORD     fdwReason,
diff --git a/giscanner/scannerlexer.l b/giscanner/scannerlexer.l
index 4d9657a6..bcce4397 100644
--- a/giscanner/scannerlexer.l
+++ b/giscanner/scannerlexer.l
@@ -371,6 +371,15 @@ check_identifier (GISourceScanner *scanner,
 #define G_PATH_LENGTH 2048
 #endif
 
+#ifdef _WIN32
+/* We don't want to include <windows.h> as it clashes horribly
+ * with token names from scannerparser.h. So just declare
+ * GetFullPathNameA() here unless we already defined it, like
+ * in giscanner.c.
+ */
+extern unsigned long __stdcall GetFullPathNameA(const char*, int, char*, char**);
+#endif
+
 static inline char *
 _realpath (const char *path)
 {
@@ -379,12 +388,6 @@ _realpath (const char *path)
 
   return realpath (path, buffer) ? g_strdup (buffer) : NULL;
 #else
-  /* We don't want to include <windows.h> as it clashes horribly
-   * with token names from scannerparser.h. So just declare
-   * GetFullPathNameA() here unless we already defined it, like
-   * in giscanner.c.
-   */
-  extern unsigned long __stdcall GetFullPathNameA(const char*, int, char*, char**);
   char *buffer;
   char dummy;
   int rc, len;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]