From 63fa5b7f52231da14483d4541c477b57b948e47b Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 3 Nov 2021 23:39:38 +0100 Subject: [PATCH 1/5] gtk-launch: Remove compile-time warning This warning causes a -Werror build to fail. --- tools/gtk-launch.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/gtk-launch.c b/tools/gtk-launch.c index 3ed73dde0f..dc7ba81852 100644 --- a/tools/gtk-launch.c +++ b/tools/gtk-launch.c @@ -132,7 +132,6 @@ main (int argc, char *argv[]) info = G_APP_INFO (g_desktop_app_info_new (desktop_file_name)); g_free (desktop_file_name); #else -#warning Please add support for creating AppInfo from id for your OS g_printerr (_("Creating AppInfo from id not supported on non unix operating systems")); #endif args++; From bf3cf8bb2938988b3805d7eb0933b3f3d9a48a4e Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 3 Nov 2021 23:40:33 +0100 Subject: [PATCH 2/5] glcontext: Avoid gcc warning on non-egl build --- gdk/gdkglcontext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c index 040b9cce1a..599b946de9 100644 --- a/gdk/gdkglcontext.c +++ b/gdk/gdkglcontext.c @@ -504,8 +504,8 @@ gdk_gl_context_real_is_shared (GdkGLContext *self, static gboolean gdk_gl_context_real_clear_current (GdkGLContext *context) { - GdkDisplay *display = gdk_gl_context_get_display (context); #ifdef HAVE_EGL + GdkDisplay *display = gdk_gl_context_get_display (context); GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context); if (priv->egl_context == NULL) From de271c9a30a45a421f5b7ed96e3dba116aad725d Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Thu, 4 Nov 2021 01:41:05 +0100 Subject: [PATCH 3/5] ci: Disable -Werror on all subprojects Would be nice if meson had a nicer way of doing this, but... --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bb4690b179..2e254189f5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,7 +22,7 @@ stages: # Common variables variables: - COMMON_MESON_FLAGS: "-Dwerror=true -Dglib:werror=false -Dpango:werror=false -Dgtk-doc:werror=false -Dwayland-protocols:werror=false -Dsysprof:werror=false -Dwayland:werror=false" + COMMON_MESON_FLAGS: "-Dwerror=true -Dcairo:werror=false -Dgi-docgen:werror=false -Dgraphene:werror=false -Dlibepoxy:werror=false -Dlibsass:werror=false -Dpango:werror=false -Dsassc:werror=false -Dgdk-pixbuf:werror=false -Dglib:werror=false -Dlibcloudproviders:werror=false -Dlibpng:werror=false -Dlibtiff:werror=false -Dsysprof:werror=false -Dwayland-protocols:werror=false -Dharfbuzz:werror=false -Dfreetype2:werror=false -Dfontconfig:werror=false -Dfribidi:werror=false -Dlibffi:werror=false -Dlibjpeg-turbo:werror=false -Dmutest:werror=false -Dpixman:werror=false -Dproxy-libintl:werror=false" BACKEND_FLAGS: "-Dx11-backend=true -Dwayland-backend=true -Dbroadway-backend=true" FEATURE_FLAGS: "-Dvulkan=enabled -Dcloudproviders=enabled" MESON_TEST_TIMEOUT_MULTIPLIER: 3 From ac81e71f789d95bf070403418cb5d44103f31987 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Thu, 4 Nov 2021 00:59:19 +0100 Subject: [PATCH 4/5] gtk-launch: Fix unused variable warning on macOS --- tools/gtk-launch.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/gtk-launch.c b/tools/gtk-launch.c index dc7ba81852..04f103771c 100644 --- a/tools/gtk-launch.c +++ b/tools/gtk-launch.c @@ -49,8 +49,10 @@ main (int argc, char *argv[]) GOptionContext *context = NULL; char *summary; char *app_name; -#ifdef G_OS_UNIX +#if defined(HAVE_GIO_UNIX) && !defined(__APPLE__) char *desktop_file_name; +#endif +#ifdef G_OS_UNIX char *bus_name = NULL; #endif GAppInfo *info = NULL; From 998c382037780cfa13ee4b8e16de801bf6939615 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Thu, 4 Nov 2021 00:27:27 +0100 Subject: [PATCH 5/5] build: Turn off tautological-constant-out-of-range-compare warning This issues a warning when an enum value is compared to a value that is out of range for the enum. We do this a lot, either when using -1 for undefined values or when comparing array sizes to enum values like so: enum { ONE, TWO, THREE } some_enum_value; const char *names= { "one", "two", "three" }; g_assert (some_enum_value < G_N_ELEMENTS (names)); --- meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/meson.build b/meson.build index 4282f2701c..e1d4653884 100644 --- a/meson.build +++ b/meson.build @@ -271,6 +271,7 @@ elif cc.get_id() == 'gcc' or cc.get_id() == 'clang' '-Wno-c++11-extensions', '-Wno-missing-include-dirs', '-Wno-typedef-redefinition', + '-Wno-tautological-constant-out-of-range-compare', '-Wduplicated-branches', '-Wduplicated-cond', '-Wformat=2',