GNOME Bugzilla – Bug 791924
Using -Werror when compiling vala code can cause hard-to-fix build failure
Last modified: 2017-12-26 23:23:12 UTC
If I remember correctly, vala developers recommend not to use -Werror or warnings flags to compile vala code because they think it is hard to fix the vala compiler to produce warning-free code. Here is the full error log when compiling gnome-builder on FreeBSD: [2/7] Compiling C object 'src/plugins/vala-pack/vala-pack-plugin@sha/meson-generated_ide-vala-completion.c.o'. FAILED: src/plugins/vala-pack/vala-pack-plugin@sha/meson-generated_ide-vala-completion.c.o clang -Isrc/plugins/vala-pack/vala-pack-plugin@sha -Isrc/plugins/vala-pack -I../../source/gnome-builder/src/plugins/vala-pack -Isrc/libide -I../../source/gnome-builder/src/libide -I/home/lantw44/gnome/devinstall/include/vala-0.40 -I/home/lantw44/gnome/devinstall/include/glib-2.0 -I/home/lantw44/gnome/devinstall/lib/glib-2.0/include -I/home/lantw44/gnome/devinstall/include/libpeas-1.0 -I/home/lantw44/gnome/devinstall/include/gobject-introspection-1.0 -I/usr/local/lib/libffi-3.2.1/include -I/home/lantw44/gnome/devinstall/include/libdazzle-1.0 -I/home/lantw44/gnome/devinstall/include/gtk-3.0 -I/home/lantw44/gnome/devinstall/include/pango-1.0 -I/usr/local/include/cairo -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 -I/usr/local/include/libdrm -I/usr/local/include/libpng16 -I/home/lantw44/gnome/devinstall/include/harfbuzz -I/home/lantw44/gnome/devinstall/include/gdk-pixbuf-2.0 -I/home/lantw44/gnome/devinstall/include/gio-unix-2.0/ -I/home/lantw44/gnome/devinstall/include/atk-1.0 -I/home/lantw44/gnome/devinstall/include/at-spi2-atk/2.0 -I/home/lantw44/gnome/devinstall/include/at-spi-2.0 -I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include -I/home/lantw44/gnome/devinstall/include/gtksourceview-3.0 -I/usr/local/include/libxml2 -I/home/lantw44/gnome/devinstall/include/template-glib-1.0 -I/home/lantw44/gnome/devinstall/include/json-glib-1.0 -I/home/lantw44/gnome/devinstall/include/jsonrpc-glib-1.0 -I/home/lantw44/gnome/devinstall/include/vte-2.91 -I/usr/local/include/p11-kit-1 -I/home/lantw44/gnome/build/gnome-builder -Xclang -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -w -std=gnu11 -O0 -g -Wcast-align -Wdeclaration-after-statement -Wformat-nonliteral -Wformat-security -Wmissing-include-dirs -Wnested-externs -Wno-missing-field-initializers -Wno-sign-compare -Wno-unused-parameter -Wpointer-arith -Wredundant-decls -Wswitch-default -Wswitch-enum -Wuninitialized -Werror=format-security -Werror=format=2 -Werror=empty-body -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -Werror=pointer-arith -Werror=init-self -Werror=int-conversion -Werror=missing-include-dirs -Werror=overflow -Werror=return-type -Werror=shadow -Werror=strict-prototypes -Werror=undef -fstack-protector-strong -DHAVE_CONFIG_H -D_GNU_SOURCE -DIDE_COMPILATION -march=corei7 -B/home/lantw44/.local/bin -g3 -O0 -fPIC -pthread -D_THREAD_SAFE '-DVALA_VERSION="0.40"' '-DLOG_DOMAIN="vala-pack-plugin"' '-DGETTEXT_PACKAGE="gnome-builder"' '-DPACKAGE_DATADIR="/home/lantw44/gnome/devinstall/share/gnome-builder"' -MMD -MQ 'src/plugins/vala-pack/vala-pack-plugin@sha/meson-generated_ide-vala-completion.c.o' -MF 'src/plugins/vala-pack/vala-pack-plugin@sha/meson-generated_ide-vala-completion.c.o.d' -o 'src/plugins/vala-pack/vala-pack-plugin@sha/meson-generated_ide-vala-completion.c.o' -c 'src/plugins/vala-pack/vala-pack-plugin@sha/ide-vala-completion.c' /home/lantw44/gnome/devinstall/share/vala-0.40/vapi/glib-2.0.vapi:1242:13: error: passing 'const gchar *' (aka 'const char *') to parameter of type 'gchar *' (aka 'char *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] g_strchug (_tmp1_); ^~~~~~ /home/lantw44/gnome/devinstall/include/glib-2.0/glib/gstrfuncs.h:176:55: note: passing argument to parameter 'string' here gchar* g_strchug (gchar *string); ^ 1 error generated. [3/7] Compiling C object 'src/plugins/vala-pack/vala-pack-plugin@sha/meson-generated_ide-vala-indenter.c.o'. FAILED: src/plugins/vala-pack/vala-pack-plugin@sha/meson-generated_ide-vala-indenter.c.o clang -Isrc/plugins/vala-pack/vala-pack-plugin@sha -Isrc/plugins/vala-pack -I../../source/gnome-builder/src/plugins/vala-pack -Isrc/libide -I../../source/gnome-builder/src/libide -I/home/lantw44/gnome/devinstall/include/vala-0.40 -I/home/lantw44/gnome/devinstall/include/glib-2.0 -I/home/lantw44/gnome/devinstall/lib/glib-2.0/include -I/home/lantw44/gnome/devinstall/include/libpeas-1.0 -I/home/lantw44/gnome/devinstall/include/gobject-introspection-1.0 -I/usr/local/lib/libffi-3.2.1/include -I/home/lantw44/gnome/devinstall/include/libdazzle-1.0 -I/home/lantw44/gnome/devinstall/include/gtk-3.0 -I/home/lantw44/gnome/devinstall/include/pango-1.0 -I/usr/local/include/cairo -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 -I/usr/local/include/libdrm -I/usr/local/include/libpng16 -I/home/lantw44/gnome/devinstall/include/harfbuzz -I/home/lantw44/gnome/devinstall/include/gdk-pixbuf-2.0 -I/home/lantw44/gnome/devinstall/include/gio-unix-2.0/ -I/home/lantw44/gnome/devinstall/include/atk-1.0 -I/home/lantw44/gnome/devinstall/include/at-spi2-atk/2.0 -I/home/lantw44/gnome/devinstall/include/at-spi-2.0 -I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include -I/home/lantw44/gnome/devinstall/include/gtksourceview-3.0 -I/usr/local/include/libxml2 -I/home/lantw44/gnome/devinstall/include/template-glib-1.0 -I/home/lantw44/gnome/devinstall/include/json-glib-1.0 -I/home/lantw44/gnome/devinstall/include/jsonrpc-glib-1.0 -I/home/lantw44/gnome/devinstall/include/vte-2.91 -I/usr/local/include/p11-kit-1 -I/home/lantw44/gnome/build/gnome-builder -Xclang -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -w -std=gnu11 -O0 -g -Wcast-align -Wdeclaration-after-statement -Wformat-nonliteral -Wformat-security -Wmissing-include-dirs -Wnested-externs -Wno-missing-field-initializers -Wno-sign-compare -Wno-unused-parameter -Wpointer-arith -Wredundant-decls -Wswitch-default -Wswitch-enum -Wuninitialized -Werror=format-security -Werror=format=2 -Werror=empty-body -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -Werror=pointer-arith -Werror=init-self -Werror=int-conversion -Werror=missing-include-dirs -Werror=overflow -Werror=return-type -Werror=shadow -Werror=strict-prototypes -Werror=undef -fstack-protector-strong -DHAVE_CONFIG_H -D_GNU_SOURCE -DIDE_COMPILATION -march=corei7 -B/home/lantw44/.local/bin -g3 -O0 -fPIC -pthread -D_THREAD_SAFE '-DVALA_VERSION="0.40"' '-DLOG_DOMAIN="vala-pack-plugin"' '-DGETTEXT_PACKAGE="gnome-builder"' '-DPACKAGE_DATADIR="/home/lantw44/gnome/devinstall/share/gnome-builder"' -MMD -MQ 'src/plugins/vala-pack/vala-pack-plugin@sha/meson-generated_ide-vala-indenter.c.o' -MF 'src/plugins/vala-pack/vala-pack-plugin@sha/meson-generated_ide-vala-indenter.c.o.d' -o 'src/plugins/vala-pack/vala-pack-plugin@sha/meson-generated_ide-vala-indenter.c.o' -c 'src/plugins/vala-pack/vala-pack-plugin@sha/ide-vala-indenter.c' /home/lantw44/gnome/devinstall/share/vala-0.40/vapi/glib-2.0.vapi:1250:14: error: passing 'const gchar *' (aka 'const char *') to parameter of type 'gchar *' (aka 'char *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] g_strstrip (_tmp1_); ^~~~~~ /home/lantw44/gnome/devinstall/include/glib-2.0/glib/gstrfuncs.h:181:53: note: expanded from macro 'g_strstrip' #define g_strstrip( string ) g_strchomp (g_strchug (string)) ^~~~~~ /home/lantw44/gnome/devinstall/include/glib-2.0/glib/gstrfuncs.h:176:55: note: passing argument to parameter 'string' here gchar* g_strchug (gchar *string); ^ 1 error generated. [4/7] Compiling C object 'src/plugins/vala-pack/vala-pack-plugin@sha/meson-generated_ide-vala-code-indexer.c.o'. FAILED: src/plugins/vala-pack/vala-pack-plugin@sha/meson-generated_ide-vala-code-indexer.c.o clang -Isrc/plugins/vala-pack/vala-pack-plugin@sha -Isrc/plugins/vala-pack -I../../source/gnome-builder/src/plugins/vala-pack -Isrc/libide -I../../source/gnome-builder/src/libide -I/home/lantw44/gnome/devinstall/include/vala-0.40 -I/home/lantw44/gnome/devinstall/include/glib-2.0 -I/home/lantw44/gnome/devinstall/lib/glib-2.0/include -I/home/lantw44/gnome/devinstall/include/libpeas-1.0 -I/home/lantw44/gnome/devinstall/include/gobject-introspection-1.0 -I/usr/local/lib/libffi-3.2.1/include -I/home/lantw44/gnome/devinstall/include/libdazzle-1.0 -I/home/lantw44/gnome/devinstall/include/gtk-3.0 -I/home/lantw44/gnome/devinstall/include/pango-1.0 -I/usr/local/include/cairo -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 -I/usr/local/include/libdrm -I/usr/local/include/libpng16 -I/home/lantw44/gnome/devinstall/include/harfbuzz -I/home/lantw44/gnome/devinstall/include/gdk-pixbuf-2.0 -I/home/lantw44/gnome/devinstall/include/gio-unix-2.0/ -I/home/lantw44/gnome/devinstall/include/atk-1.0 -I/home/lantw44/gnome/devinstall/include/at-spi2-atk/2.0 -I/home/lantw44/gnome/devinstall/include/at-spi-2.0 -I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include -I/home/lantw44/gnome/devinstall/include/gtksourceview-3.0 -I/usr/local/include/libxml2 -I/home/lantw44/gnome/devinstall/include/template-glib-1.0 -I/home/lantw44/gnome/devinstall/include/json-glib-1.0 -I/home/lantw44/gnome/devinstall/include/jsonrpc-glib-1.0 -I/home/lantw44/gnome/devinstall/include/vte-2.91 -I/usr/local/include/p11-kit-1 -I/home/lantw44/gnome/build/gnome-builder -Xclang -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -w -std=gnu11 -O0 -g -Wcast-align -Wdeclaration-after-statement -Wformat-nonliteral -Wformat-security -Wmissing-include-dirs -Wnested-externs -Wno-missing-field-initializers -Wno-sign-compare -Wno-unused-parameter -Wpointer-arith -Wredundant-decls -Wswitch-default -Wswitch-enum -Wuninitialized -Werror=format-security -Werror=format=2 -Werror=empty-body -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -Werror=pointer-arith -Werror=init-self -Werror=int-conversion -Werror=missing-include-dirs -Werror=overflow -Werror=return-type -Werror=shadow -Werror=strict-prototypes -Werror=undef -fstack-protector-strong -DHAVE_CONFIG_H -D_GNU_SOURCE -DIDE_COMPILATION -march=corei7 -B/home/lantw44/.local/bin -g3 -O0 -fPIC -pthread -D_THREAD_SAFE '-DVALA_VERSION="0.40"' '-DLOG_DOMAIN="vala-pack-plugin"' '-DGETTEXT_PACKAGE="gnome-builder"' '-DPACKAGE_DATADIR="/home/lantw44/gnome/devinstall/share/gnome-builder"' -MMD -MQ 'src/plugins/vala-pack/vala-pack-plugin@sha/meson-generated_ide-vala-code-indexer.c.o' -MF 'src/plugins/vala-pack/vala-pack-plugin@sha/meson-generated_ide-vala-code-indexer.c.o.d' -o 'src/plugins/vala-pack/vala-pack-plugin@sha/meson-generated_ide-vala-code-indexer.c.o' -c 'src/plugins/vala-pack/vala-pack-plugin@sha/ide-vala-code-indexer.c' /home/lantw44/gnome/source/gnome-builder/src/plugins/vala-pack/ide-vala-code-indexer.vala:44:37: error: incompatible pointer types passing 'void (gconstpointer, gpointer)' (aka 'void (const void *, void *)') to parameter of type 'GFunc' (aka 'void (*)(void *, void *)') [-Werror,-Wincompatible-pointer-types] ide_vala_index_do_locked (_tmp11_, ___lambda15__gfunc, _data1_); ^~~~~~~~~~~~~~~~~~ src/plugins/vala-pack/vala-pack-plugin@sha/ide-vala-code-indexer.c:245:38: note: passing argument to parameter 'func' here GFunc func, ^ /home/lantw44/gnome/source/gnome-builder/src/plugins/vala-pack/ide-vala-code-indexer.vala:29:20: error: incompatible function pointer types assigning to 'IdeCodeIndexEntries *(*)(IdeCodeIndexer *, GFile *, const gchar *const *, GCancellable *, GError **)' (aka 'struct _IdeCodeIndexEntries *(*)(struct _IdeCodeIndexer *, struct _GFile *, const char *const *, struct _GCancellable *, struct _GError **)') from 'IdeCodeIndexEntries *(*)(IdeCodeIndexer *, GFile *, gchar **, GCancellable *, GError **)' (aka 'struct _IdeCodeIndexEntries *(*)(struct _IdeCodeIndexer *, struct _GFile *, char **, struct _GCancellable *, struct _GError **)') [-Werror,-Wincompatible-function-pointer-types] iface->index_file = (IdeCodeIndexEntries* (*) (IdeCodeIndexer *, GFile*, gchar**, GCancellable*, GError**)) ide_vala_code_indexer_real_index_file; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 errors generated. [5/7] Compiling C object 'src/plugins/vala-pack/vala-pack-plugin@sha/meson-generated_ide-vala-source-file.c.o'. FAILED: src/plugins/vala-pack/vala-pack-plugin@sha/meson-generated_ide-vala-source-file.c.o clang -Isrc/plugins/vala-pack/vala-pack-plugin@sha -Isrc/plugins/vala-pack -I../../source/gnome-builder/src/plugins/vala-pack -Isrc/libide -I../../source/gnome-builder/src/libide -I/home/lantw44/gnome/devinstall/include/vala-0.40 -I/home/lantw44/gnome/devinstall/include/glib-2.0 -I/home/lantw44/gnome/devinstall/lib/glib-2.0/include -I/home/lantw44/gnome/devinstall/include/libpeas-1.0 -I/home/lantw44/gnome/devinstall/include/gobject-introspection-1.0 -I/usr/local/lib/libffi-3.2.1/include -I/home/lantw44/gnome/devinstall/include/libdazzle-1.0 -I/home/lantw44/gnome/devinstall/include/gtk-3.0 -I/home/lantw44/gnome/devinstall/include/pango-1.0 -I/usr/local/include/cairo -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 -I/usr/local/include/libdrm -I/usr/local/include/libpng16 -I/home/lantw44/gnome/devinstall/include/harfbuzz -I/home/lantw44/gnome/devinstall/include/gdk-pixbuf-2.0 -I/home/lantw44/gnome/devinstall/include/gio-unix-2.0/ -I/home/lantw44/gnome/devinstall/include/atk-1.0 -I/home/lantw44/gnome/devinstall/include/at-spi2-atk/2.0 -I/home/lantw44/gnome/devinstall/include/at-spi-2.0 -I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include -I/home/lantw44/gnome/devinstall/include/gtksourceview-3.0 -I/usr/local/include/libxml2 -I/home/lantw44/gnome/devinstall/include/template-glib-1.0 -I/home/lantw44/gnome/devinstall/include/json-glib-1.0 -I/home/lantw44/gnome/devinstall/include/jsonrpc-glib-1.0 -I/home/lantw44/gnome/devinstall/include/vte-2.91 -I/usr/local/include/p11-kit-1 -I/home/lantw44/gnome/build/gnome-builder -Xclang -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -w -std=gnu11 -O0 -g -Wcast-align -Wdeclaration-after-statement -Wformat-nonliteral -Wformat-security -Wmissing-include-dirs -Wnested-externs -Wno-missing-field-initializers -Wno-sign-compare -Wno-unused-parameter -Wpointer-arith -Wredundant-decls -Wswitch-default -Wswitch-enum -Wuninitialized -Werror=format-security -Werror=format=2 -Werror=empty-body -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -Werror=pointer-arith -Werror=init-self -Werror=int-conversion -Werror=missing-include-dirs -Werror=overflow -Werror=return-type -Werror=shadow -Werror=strict-prototypes -Werror=undef -fstack-protector-strong -DHAVE_CONFIG_H -D_GNU_SOURCE -DIDE_COMPILATION -march=corei7 -B/home/lantw44/.local/bin -g3 -O0 -fPIC -pthread -D_THREAD_SAFE '-DVALA_VERSION="0.40"' '-DLOG_DOMAIN="vala-pack-plugin"' '-DGETTEXT_PACKAGE="gnome-builder"' '-DPACKAGE_DATADIR="/home/lantw44/gnome/devinstall/share/gnome-builder"' -MMD -MQ 'src/plugins/vala-pack/vala-pack-plugin@sha/meson-generated_ide-vala-source-file.c.o' -MF 'src/plugins/vala-pack/vala-pack-plugin@sha/meson-generated_ide-vala-source-file.c.o.d' -o 'src/plugins/vala-pack/vala-pack-plugin@sha/meson-generated_ide-vala-source-file.c.o' -c 'src/plugins/vala-pack/vala-pack-plugin@sha/ide-vala-source-file.c' /home/lantw44/gnome/source/gnome-builder/src/plugins/vala-pack/ide-vala-source-file.vala:109:10: error: assigning to 'guint8 *' (aka 'unsigned char *') from 'gconstpointer' (aka 'const void *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] _tmp5_ = g_bytes_get_data (_tmp3_, &_tmp4_); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/lantw44/gnome/source/gnome-builder/src/plugins/vala-pack/ide-vala-source-file.vala:110:12: error: assigning to 'guint8 *' (aka 'unsigned char *') from 'gconstpointer' (aka 'const void *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] _tmp10_ = g_bytes_get_data (_tmp8_, &_tmp9_); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/lantw44/gnome/source/gnome-builder/src/plugins/vala-pack/ide-vala-source-file.vala:105:38: error: incompatible pointer types passing 'void (gconstpointer, gpointer)' (aka 'void (const void *, void *)') to parameter of type 'GFunc' (aka 'void (*)(void *, void *)') [-Werror,-Wincompatible-pointer-types] g_ptr_array_foreach (unsaved_files, ___lambda4__gfunc, _data8_); ^~~~~~~~~~~~~~~~~ /home/lantw44/gnome/devinstall/include/glib-2.0/glib/garray.h:183:27: note: passing argument to parameter 'func' here GFunc func, ^ 3 errors generated. [6/7] Compiling C object 'src/plugins/vala-pack/vala-pack-plugin@sha/meson-generated_ide-vala-index.c.o'. FAILED: src/plugins/vala-pack/vala-pack-plugin@sha/meson-generated_ide-vala-index.c.o clang -Isrc/plugins/vala-pack/vala-pack-plugin@sha -Isrc/plugins/vala-pack -I../../source/gnome-builder/src/plugins/vala-pack -Isrc/libide -I../../source/gnome-builder/src/libide -I/home/lantw44/gnome/devinstall/include/vala-0.40 -I/home/lantw44/gnome/devinstall/include/glib-2.0 -I/home/lantw44/gnome/devinstall/lib/glib-2.0/include -I/home/lantw44/gnome/devinstall/include/libpeas-1.0 -I/home/lantw44/gnome/devinstall/include/gobject-introspection-1.0 -I/usr/local/lib/libffi-3.2.1/include -I/home/lantw44/gnome/devinstall/include/libdazzle-1.0 -I/home/lantw44/gnome/devinstall/include/gtk-3.0 -I/home/lantw44/gnome/devinstall/include/pango-1.0 -I/usr/local/include/cairo -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 -I/usr/local/include/libdrm -I/usr/local/include/libpng16 -I/home/lantw44/gnome/devinstall/include/harfbuzz -I/home/lantw44/gnome/devinstall/include/gdk-pixbuf-2.0 -I/home/lantw44/gnome/devinstall/include/gio-unix-2.0/ -I/home/lantw44/gnome/devinstall/include/atk-1.0 -I/home/lantw44/gnome/devinstall/include/at-spi2-atk/2.0 -I/home/lantw44/gnome/devinstall/include/at-spi-2.0 -I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include -I/home/lantw44/gnome/devinstall/include/gtksourceview-3.0 -I/usr/local/include/libxml2 -I/home/lantw44/gnome/devinstall/include/template-glib-1.0 -I/home/lantw44/gnome/devinstall/include/json-glib-1.0 -I/home/lantw44/gnome/devinstall/include/jsonrpc-glib-1.0 -I/home/lantw44/gnome/devinstall/include/vte-2.91 -I/usr/local/include/p11-kit-1 -I/home/lantw44/gnome/build/gnome-builder -Xclang -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -w -std=gnu11 -O0 -g -Wcast-align -Wdeclaration-after-statement -Wformat-nonliteral -Wformat-security -Wmissing-include-dirs -Wnested-externs -Wno-missing-field-initializers -Wno-sign-compare -Wno-unused-parameter -Wpointer-arith -Wredundant-decls -Wswitch-default -Wswitch-enum -Wuninitialized -Werror=format-security -Werror=format=2 -Werror=empty-body -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -Werror=pointer-arith -Werror=init-self -Werror=int-conversion -Werror=missing-include-dirs -Werror=overflow -Werror=return-type -Werror=shadow -Werror=strict-prototypes -Werror=undef -fstack-protector-strong -DHAVE_CONFIG_H -D_GNU_SOURCE -DIDE_COMPILATION -march=corei7 -B/home/lantw44/.local/bin -g3 -O0 -fPIC -pthread -D_THREAD_SAFE '-DVALA_VERSION="0.40"' '-DLOG_DOMAIN="vala-pack-plugin"' '-DGETTEXT_PACKAGE="gnome-builder"' '-DPACKAGE_DATADIR="/home/lantw44/gnome/devinstall/share/gnome-builder"' -MMD -MQ 'src/plugins/vala-pack/vala-pack-plugin@sha/meson-generated_ide-vala-index.c.o' -MF 'src/plugins/vala-pack/vala-pack-plugin@sha/meson-generated_ide-vala-index.c.o.d' -o 'src/plugins/vala-pack/vala-pack-plugin@sha/meson-generated_ide-vala-index.c.o' -c 'src/plugins/vala-pack/vala-pack-plugin@sha/ide-vala-index.c' /home/lantw44/gnome/devinstall/share/vala-0.40/vapi/glib-2.0.vapi:1250:14: error: passing 'const gchar *' (aka 'const char *') to parameter of type 'gchar *' (aka 'char *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] g_strstrip (_tmp1_); ^~~~~~ /home/lantw44/gnome/devinstall/include/glib-2.0/glib/gstrfuncs.h:181:53: note: expanded from macro 'g_strstrip' #define g_strstrip( string ) g_strchomp (g_strchug (string)) ^~~~~~ /home/lantw44/gnome/devinstall/include/glib-2.0/glib/gstrfuncs.h:176:55: note: passing argument to parameter 'string' here gchar* g_strchug (gchar *string); ^ 1 error generated. ninja: build stopped: cannot make progress due to previous errors.
Created attachment 365966 [details] [review] ignore incompatible pointer types We don't use -Werror, but only -Werror= for specific things. It looks like in this case that is happening for: -Werror,-Wincompatible-pointer-types-discards-qualifiers I don't get this error on Linux with GCC at least. I would accept patches for the src/plugins/vala-pack/meson.build to not build with that level of warnings, but these settings have caught numerous errors so I really don't want to disable them. Especially since it's not a problem with GCC. Can you try this and see if it helps?
(In reply to Christian Hergert from comment #1) > Can you try this and see if it helps? Yes, it compiles without -Werror problems now.