From 57eb99d2ffeb45d8661d788e26a376096a7e1f38 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-mingw64.sh | 1 + ci/build-msys2.sh | 1 + ci/build-tumbleweed.sh | 1 + meson.build | 2 -- video/out/d3d11/ra_d3d11.c | 2 +- video/out/placebo/ra_pl.c | 14 ++++++++------ video/out/vo_gpu_next.c | 24 ++++++++++++++---------- 8 files changed, 27 insertions(+), 19 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-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/d3d11/ra_d3d11.c b/video/out/d3d11/ra_d3d11.c index c002d8aad39c9..f2414b8515ca1 100644 --- a/video/out/d3d11/ra_d3d11.c +++ b/video/out/d3d11/ra_d3d11.c @@ -1598,7 +1598,7 @@ static void save_cached_program(struct ra *ra, struct ra_renderpass *pass, .comp_bytecode_len = comp_bc.len, }; memcpy(header.magic, cache_magic, sizeof(header.magic)); - strncpy(header.compiler, spirv->name, sizeof(header.compiler) - 1); + memcpy(header.compiler, spirv->name, sizeof(header.compiler)); struct bstr *prog = &pass->params.cached_program; bstr_xappend(pass, prog, (bstr){ (char *) &header, sizeof(header) }); diff --git a/video/out/placebo/ra_pl.c b/video/out/placebo/ra_pl.c index 7b15022367412..17a9def2bced4 100644 --- a/video/out/placebo/ra_pl.c +++ b/video/out/placebo/ra_pl.c @@ -450,9 +450,11 @@ 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( + pl_params.cached_program = params->cached_program.start; + pl_params.cached_program_len = params->cached_program.len; + ) struct pl_blend_params blend_params; @@ -505,10 +507,10 @@ static struct ra_renderpass *renderpass_create_pl(struct ra *ra, .priv = talloc_steal(pass, priv), }; - pass->params.cached_program = (struct bstr) { - .start = (void *) priv->pass->params.cached_program, - .len = priv->pass->params.cached_program_len, - }; + AV_NOWARN_DEPRECATED( + pass->params.cached_program.start = (void *) priv->pass->params.cached_program; + pass->params.cached_program.len = priv->pass->params.cached_program_len; + ) // fall through error: diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c index fe9d12d8acadf..07e61405373a0 100644 --- a/video/out/vo_gpu_next.c +++ b/video/out/vo_gpu_next.c @@ -1234,7 +1234,7 @@ static bool update_icc(struct priv *p, struct bstr icc) return ok; #else talloc_free((void *) p->icc_profile.data); - profile.data = talloc_steal(p, profile.data); + profile.data = talloc_steal(p, (void *) profile.data); p->icc_profile = profile; return true; #endif @@ -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,11 @@ 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; + p->icc_params.cache_save = icc_save; + p->icc_params.cache_load = icc_load; + ) #if PL_API_VER < 327 p->pars->params.icc_params = &p->icc_params; #endif @@ -2124,9 +2126,11 @@ 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; + if (isnan(pars->color_map_params.tone_mapping_param)) // vo_gpu compatibility + 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;