summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2019-01-01 18:06:47 +0100
committerChristoph Reiter <reiter.christoph@gmail.com>2019-01-01 18:06:47 +0100
commit295dcbd57c40d530abbc791cb5c1da15dea45d82 (patch)
treef9a9a85f30d23223fe2f6d5b3e36022c9dd49804
parent0b09e4a142e81175bc56239c9ae80b5d5dfc6402 (diff)
downloadgobject-introspection-295dcbd57c40d530abbc791cb5c1da15dea45d82.tar.gz
ci: enable -Werror for msys2+meson
-rw-r--r--.gitlab-ci/test-msys2-meson.sh1
-rw-r--r--girepository/cmph/meson.build1
-rw-r--r--girepository/girepository.c2
-rw-r--r--giscanner/scannerlexer.l15
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;