vlc | branch: master | Alexandre Janniaux <[email protected]> | Mon Mar 22 10:01:45 2021 +0100| [4d04dd0981d7f9823a3d2887cfe41707aadd2b82] | committer: Alexandre Janniaux
display: assert that we handle all crop cases 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. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4d04dd0981d7f9823a3d2887cfe41707aadd2b82 --- 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 _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
