[vlc-devel] [PATCH] display: assert that we handle all crop cases

Thomas Guillem thomas at gllm.fr
Mon Mar 22 09:06:43 UTC 2021


lgtm


On Mon, Mar 22, 2021, at 10:01, Alexandre Janniaux wrote:
> Otherwise, left/right/top/bottom will not be initialized when used,
> probably leading to strange cropping being used. It fixes
> -Wmaybe-uninitialized warnings with GCC 10.2.0.
> ---
>  src/video_output/display.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/src/video_output/display.c b/src/video_output/display.c
> index 06dd9533db..ff665d2af5 100644
> --- a/src/video_output/display.c
> +++ b/src/video_output/display.c
> @@ -471,6 +471,9 @@ static int vout_UpdateSourceCrop(vout_display_t *vd)
>              right = -(int)osys->crop.border.right;
>              bottom = -(int)osys->crop.border.bottom;
>              break;
> +        default:
> +            /* left/top/right/bottom must be initialized */
> +            vlc_assert_unreachable();
>      }
>  
>      const int right_max  = osys->source.i_x_offset
> -- 
> 2.31.0
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list