From 0fc71f5da70ef7808487e3d299a6dce3f824de09 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Fri, 26 Apr 2024 15:56:45 +0200 Subject: [PATCH 1/2] activate Werror flag in CI build job --- .gitlab-ci.yml | 5 +++++ Makefile | 2 ++ 2 files changed, 7 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 02326273d..9ac0f0283 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -145,6 +145,10 @@ stages: - cp "$LTV_DIR"/*.met scripts/testv/ - cp "$LTV_DIR"/*.csv scripts/testv/ +.activate-Werror-linux: &activate-Werror-linux + - sed -i.bak "s/^# \(CFLAGS += -Werror\)/\1/" Makefile + - sed -i.bak "s/# \(set(CMAKE_C_FLAGS \"\${CMAKE_C_FLAGS} -Werror\")\)/\1/" CMakeLists.txt + .rules-pytest-mld: rules: - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-mld" @@ -302,6 +306,7 @@ build-codec-linux-make: - .build-job-linux script: - *print-common-info + - *activate-Werror-linux - make -j # ensure that codec builds on linux with instrumentation active diff --git a/Makefile b/Makefile index 311cb8b9b..0467146ba 100644 --- a/Makefile +++ b/Makefile @@ -58,6 +58,8 @@ CFLAGS += -std=c99 -pedantic -Wcast-qual -Wall -W -Wextra -Wno-long-long \ -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ -Werror-implicit-function-declaration \ -Wno-implicit-fallthrough -ffp-contract=off +# to be uncommented in CI +# CFLAGS += -Werror # libs to link LDLIBS += -lm -- GitLab From 43affee3dfed080f8e6c804bddfe911d78a66b85 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Fri, 26 Apr 2024 16:00:12 +0200 Subject: [PATCH 2/2] remove CMake part from Werror anchor --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9ac0f0283..943857c59 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -147,7 +147,6 @@ stages: .activate-Werror-linux: &activate-Werror-linux - sed -i.bak "s/^# \(CFLAGS += -Werror\)/\1/" Makefile - - sed -i.bak "s/# \(set(CMAKE_C_FLAGS \"\${CMAKE_C_FLAGS} -Werror\")\)/\1/" CMakeLists.txt .rules-pytest-mld: rules: -- GitLab