[libdvdcss-devel] [Git][videolan/libdvdcss][master] 6 commits: CI: compile with warning level 2
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Fri Jul 17 13:25:58 UTC 2026
Jean-Baptiste Kempf pushed to branch master at VideoLAN / libdvdcss
Commits:
f2c61c81 by Steve Lhomme at 2026-07-17T13:15:35+02:00
CI: compile with warning level 2
The default value is 1 [^1] which corresponds to -Wall [^2].
Level 2 adds `-Wextra`.
[^1]: https://mesonbuild.com/Builtin-options.html#core-options
[^2]: https://mesonbuild.com/Builtin-options.html#details-for-warning_level
- - - - -
7704c80e by Steve Lhomme at 2026-07-17T13:15:35+02:00
meson: add some sanity warnings
Based on the ones to check common errors in VLC.
- - - - -
bb6cf50a by Steve Lhomme at 2026-07-17T13:15:35+02:00
meson: add an option to generate errors on common C code issues
Taken from the list in VLC.
This is off by default
- - - - -
dab4a005 by Steve Lhomme at 2026-07-17T13:15:35+02:00
CI: build some targets with extra compiler checks
Developers should compile with this flag to find potential code issues.
- - - - -
a6ab60af by Steve Lhomme at 2026-07-17T13:18:07+02:00
CI: update the vlc-debian-llvm-ucrt image
- - - - -
d5cc8a29 by Steve Lhomme at 2026-07-17T13:21:26+02:00
CI: use a newer arm macos runner
The x86_64 will soon die at Apple.
These runners should have a recent meson and ninja preinstalled.
- - - - -
3 changed files:
- .gitlab-ci.yml
- meson.build
- meson_options.txt
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -15,13 +15,13 @@ variables:
- docker
- amd64
script:
- - meson setup build
+ - meson setup build -Dwarning_level=2 -Dextra_checks=true
- meson compile -C build
.build-cross:
extends: .build-docker
script:
- - meson setup build --cross-file package/crossfiles/${CROSSFILE}.meson
+ - meson setup build -Dwarning_level=2 -Dextra_checks=true --cross-file package/crossfiles/${CROSSFILE}.meson
- meson compile -C build
build-debian:
@@ -42,12 +42,7 @@ build-raspberry:
build-macos-arm64:
extends: .build-docker
tags:
- - macos-m1
- before_script:
- - python3 -m venv .venv
- - . .venv/bin/activate
- - pip install --upgrade pip
- - pip install meson==1.9.0 ninja==1.13.0
+ - macos-xcode26
build-macos:
extends: .build-docker
@@ -64,7 +59,7 @@ build-win:
build-win-arm:
extends: .build-cross
- image: registry.videolan.org/vlc-debian-llvm-ucrt:20250826105319
+ image: registry.videolan.org/vlc-debian-llvm-ucrt:20260611225331
parallel:
matrix:
- CROSSFILE: [armv7-w64-mingw32, aarch64-w64-mingw32]
=====================================
meson.build
=====================================
@@ -38,6 +38,43 @@ elif host_machine.system() == 'sunos'
test_args += '-D_POSIX_C_SOURCE=200809L'
endif
+add_project_arguments(cc.get_supported_arguments([
+ '-Wsign-compare',
+ '-Wundef',
+ '-Wpointer-arith',
+ '-Wvolatile-register-var',
+ '-Wformat',
+ '-Wformat-security',
+ '-Wduplicated-branches',
+ '-Wduplicated-cond',
+ '-Wbad-function-cast',
+ '-Wwrite-strings',
+ '-Wmissing-prototypes',
+ '-Werror-implicit-function-declaration',
+ '-Winit-self',
+ '-Wlogical-op',
+ '-Wshadow=local',
+ '-Wmultistatement-macros',
+ '-pipe'
+]), language: ['c'])
+
+if get_option('extra_checks')
+ add_project_arguments(cc.get_supported_arguments([
+ '-Werror-implicit-function-declaration',
+ '-Werror=missing-field-initializers',
+ '-Werror=format',
+ '-Werror=return-mismatch',
+ '-Werror=incompatible-pointer-types',
+ '-Werror=restrict',
+ '-Werror=int-conversion',
+ '-Werror=implicit-int',
+ '-Werror=declaration-missing-parameter-type',
+ '-Werror=excess-initializers',
+ '-Werror=unterminated-string-initialization',
+ ]), language: ['c'])
+endif
+
+
# Header checks
check_headers = [
=====================================
meson_options.txt
=====================================
@@ -8,4 +8,9 @@ option('enable_docs',
option('enable_examples',
type: 'boolean',
value: false,
- description: 'Build libdvdnav examples')
\ No newline at end of file
+ description: 'Build libdvdnav examples')
+
+option('extra_checks',
+ type : 'boolean',
+ value : false,
+ description : 'Turn some warnings into compilation error')
View it on GitLab: https://code.videolan.org/videolan/libdvdcss/-/compare/9de0528e142d6dd31c4d198130d4a48ff3397d2b...d5cc8a29324e197533d04a62156bc9a62f35798a
--
View it on GitLab: https://code.videolan.org/videolan/libdvdcss/-/compare/9de0528e142d6dd31c4d198130d4a48ff3397d2b...d5cc8a29324e197533d04a62156bc9a62f35798a
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the libdvdcss-devel
mailing list