From e217fe67690ff8d00af6ccc2bbe65720af21a979 Mon Sep 17 00:00:00 2001 From: Jason Gerecke Date: Fri, 18 Feb 2022 13:51:20 -0800 Subject: Move -Wall and -Wextra from Github-only to default CFLAGS These two options were previously only being used by the Github runner. Lets move them to configure.ac / meson.build so that we encounter these warnings on our build system **before** pushing things to Github. The only thing Github should have is `-Werror` and friends. Signed-off-by: Jason Gerecke --- .github/workflows/build.yml | 2 +- configure.ac | 2 ++ meson.build | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2ae1de1..b82cbbb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,7 +1,7 @@ on: [ push, pull_request ] env: - CFLAGS: -Werror -Wall -Wextra -Wno-error=sign-compare -Wno-unused-parameter -Wno-error=missing-field-initializers + CFLAGS: -Werror -Wno-error=sign-compare -Wno-error=missing-field-initializers UBUNTU_PACKAGES: | xutils-dev xserver-xorg-dev libx11-dev libxi-dev libxrandr-dev libxinerama-dev libudev-dev libgirepository1.0-dev libevdev-dev diff --git a/configure.ac b/configure.ac index 6e44fa9..86f30b4 100644 --- a/configure.ac +++ b/configure.ac @@ -48,6 +48,8 @@ AC_PROG_LIBTOOL # Compiler Flags / Libraries # ----------------------------------------------------------------------------- m4_define(COMPILER_FLAGS, [ + -Wall + -Wextra -Wno-unused-parameter -Wno-sign-compare dnl lots of work to get rid of this -Wmissing-prototypes diff --git a/meson.build b/meson.build index 1115e47..eeb4d31 100644 --- a/meson.build +++ b/meson.build @@ -22,6 +22,8 @@ dir_include = 'include' cc = meson.get_compiler('c') cflags = [ + '-Wall', + '-Wextra', '-Wno-unused-parameter', '-Wno-sign-compare', # lots of work to get rid of this '-Wmissing-prototypes', -- cgit v1.2.1