From c226e7d808227f33fa71026f2f419f9c744bd838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Mon, 18 Sep 2023 14:14:15 +0200 Subject: [PATCH] ci --- ci/build-freebsd.sh | 1 + ci/build-macos.sh | 1 + ci/build-mingw64.sh | 1 + ci/build-msys2.sh | 1 + ci/build-tumbleweed.sh | 1 + meson.build | 2 -- video/out/placebo/ra_pl.c | 8 ++++---- video/out/vo_gpu_next.c | 18 +++++++++--------- 8 files changed, 18 insertions(+), 15 deletions(-) diff --git a/ci/build-freebsd.sh b/ci/build-freebsd.sh index 67fdb2747a306..387ddd36e736b 100755 --- a/ci/build-freebsd.sh +++ b/ci/build-freebsd.sh @@ -6,6 +6,7 @@ export CXXFLAGS="$CXXFLAGS -isystem/usr/local/include" export LDFLAGS="$LDFLAGS -L/usr/local/lib" meson setup build \ + --werror \ -Dlibmpv=true \ -Dlua=enabled \ -Degl-drm=enabled \ diff --git a/ci/build-macos.sh b/ci/build-macos.sh index 14b3a1b934d9f..172fa6e458e5b 100755 --- a/ci/build-macos.sh +++ b/ci/build-macos.sh @@ -12,6 +12,7 @@ fi PKG_CONFIG_PATH="${FFMPEG_SYSROOT}/lib/pkgconfig/" CC="${CC}" CXX="${CXX}" \ meson setup build \ + --werror \ -Dprefix="${MPV_INSTALL_PREFIX}" \ -D{libmpv,tests}=true \ -D{gl,iconv,lcms2,lua,jpeg,plain-gl,zlib}=enabled \ diff --git a/ci/build-mingw64.sh b/ci/build-mingw64.sh index 5b17fb092055d..d742fb6ca92bb 100755 --- a/ci/build-mingw64.sh +++ b/ci/build-mingw64.sh @@ -269,6 +269,7 @@ build=mingw_build rm -rf $build meson setup $build --cross-file "$prefix_dir/crossfile" \ + --werror \ --buildtype debugoptimized \ -Dlibmpv=true -Dlua=luajit \ -D{shaderc,spirv-cross,d3d11,libplacebo}=enabled diff --git a/ci/build-msys2.sh b/ci/build-msys2.sh index b4226379ad283..e2f8381c70c4b 100755 --- a/ci/build-msys2.sh +++ b/ci/build-msys2.sh @@ -1,6 +1,7 @@ #!/bin/sh -e meson setup build \ + --werror \ -D cdda=enabled \ -D d3d-hwaccel=enabled \ -D d3d11=enabled \ diff --git a/ci/build-tumbleweed.sh b/ci/build-tumbleweed.sh index 6dd7f608d7455..3a81bea405409 100755 --- a/ci/build-tumbleweed.sh +++ b/ci/build-tumbleweed.sh @@ -2,6 +2,7 @@ set -e meson setup build \ + --werror \ -Dcdda=enabled \ -Ddvbin=enabled \ -Ddvdnav=enabled \ diff --git a/meson.build b/meson.build index 546893f61554d..887074653d140 100644 --- a/meson.build +++ b/meson.build @@ -258,8 +258,6 @@ flags = ['-D_ISOC99_SOURCE', '-D_GNU_SOURCE', link_flags = [] test_flags = ['-Werror=implicit-function-declaration', - '-Wno-error=deprecated-declarations', - '-Wno-error=unused-function', '-Wempty-body', '-Wdisabled-optimization', '-Wstrict-prototypes', diff --git a/video/out/placebo/ra_pl.c b/video/out/placebo/ra_pl.c index 7b15022367412..960bbe0989ca6 100644 --- a/video/out/placebo/ra_pl.c +++ b/video/out/placebo/ra_pl.c @@ -450,8 +450,8 @@ static struct ra_renderpass *renderpass_create_pl(struct ra *ra, .glsl_shader = params->type == RA_RENDERPASS_TYPE_COMPUTE ? params->compute_shader : params->frag_shader, - .cached_program = params->cached_program.start, - .cached_program_len = params->cached_program.len, + AV_NOWARN_DEPRECATED(.cached_program = params->cached_program.start), + AV_NOWARN_DEPRECATED(.cached_program_len = params->cached_program.len), }; struct pl_blend_params blend_params; @@ -506,8 +506,8 @@ static struct ra_renderpass *renderpass_create_pl(struct ra *ra, }; pass->params.cached_program = (struct bstr) { - .start = (void *) priv->pass->params.cached_program, - .len = priv->pass->params.cached_program_len, + AV_NOWARN_DEPRECATED(.start = (void *) priv->pass->params.cached_program), + AV_NOWARN_DEPRECATED(.len = priv->pass->params.cached_program_len), }; // fall through diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c index fe9d12d8acadf..e4fc31702b8df 100644 --- a/video/out/vo_gpu_next.c +++ b/video/out/vo_gpu_next.c @@ -1625,9 +1625,9 @@ static void uninit(struct vo *vo) if (cache_file && p->rr) { FILE *cache = fopen(cache_file, "wb"); if (cache) { - size_t size = pl_renderer_save(p->rr, NULL); + AV_NOWARN_DEPRECATED(size_t size = pl_renderer_save(p->rr, NULL)); uint8_t *buf = talloc_size(NULL, size); - pl_renderer_save(p->rr, buf); + AV_NOWARN_DEPRECATED(pl_renderer_save(p->rr, buf)); fwrite(buf, size, 1, cache); talloc_free(buf); fclose(cache); @@ -1703,7 +1703,7 @@ static int preinit(struct vo *vo) if (cache_file) { if (stat(cache_file, &(struct stat){0}) == 0) { bstr c = stream_read_file(cache_file, p, vo->global, 1000000000); - pl_renderer_load(p->rr, c.start); + AV_NOWARN_DEPRECATED(pl_renderer_load(p->rr, c.start)); talloc_free(c.start); } talloc_free(cache_file); @@ -1926,9 +1926,9 @@ static void update_icc_opts(struct priv *p, const struct mp_icc_opts *opts) p->icc_params.size_r = s_r; p->icc_params.size_g = s_g; p->icc_params.size_b = s_b; - p->icc_params.cache_priv = p; - p->icc_params.cache_save = icc_save; - p->icc_params.cache_load = icc_load; + AV_NOWARN_DEPRECATED(p->icc_params.cache_priv = p); + AV_NOWARN_DEPRECATED(p->icc_params.cache_save = icc_save); + AV_NOWARN_DEPRECATED(p->icc_params.cache_load = icc_load); #if PL_API_VER < 327 p->pars->params.icc_params = &p->icc_params; #endif @@ -2124,9 +2124,9 @@ static void update_render_options(struct vo *vo) }; pars->color_map_params.tone_mapping_function = tone_map_funs[opts->tone_map.curve]; - pars->color_map_params.tone_mapping_param = opts->tone_map.curve_param; - if (isnan(pars->color_map_params.tone_mapping_param)) // vo_gpu compatibility - pars->color_map_params.tone_mapping_param = 0.0; + AV_NOWARN_DEPRECATED(pars->color_map_params.tone_mapping_param = opts->tone_map.curve_param); + AV_NOWARN_DEPRECATED(if (isnan(pars->color_map_params.tone_mapping_param))) // vo_gpu compatibility + AV_NOWARN_DEPRECATED(pars->color_map_params.tone_mapping_param = 0.0); pars->color_map_params.inverse_tone_mapping = opts->tone_map.inverse; pars->color_map_params.contrast_recovery = opts->tone_map.contrast_recovery; pars->color_map_params.visualize_lut = opts->tone_map.visualize;