Commits on Source (2)
-
The variable was not used anymore. ../../modules/video_output/opengl/interop_sw.c: In function ‘interop_yuv_base_init’: ../../modules/video_output/opengl/interop_sw.c:439:18: warning: unused variable ‘priv’ [-Wunused-variable] 439 | struct priv *priv = interop->priv; | ^~~~
1240743f -
The compiler cannot assert that the texture count is less than 10 because the value from the sampler could change with the different function calls. Fix the value for once and ensure it doesn't go higher than 9 even in release build. This fixes the following truncation warnings: ../../modules/video_output/opengl/sampler.c: In function ‘sampler_base_fetch_locations’: ../../modules/video_output/opengl/sampler.c:271:48: warning: ‘%1u’ directive output may be truncated writing between 1 and 10 bytes into a region of size 3 [-Wformat-truncation=] 271 | snprintf(name, sizeof(name), "Textures[%1u]", i); | ^~~ ../../modules/video_output/opengl/sampler.c:271:38: note: directive argument in the range [0, 4294967294] 271 | snprintf(name, sizeof(name), "Textures[%1u]", i); | ^~~~~~~~~~~~~~~ In file included from /usr/include/stdio.h:906, from ../../include/vlc_common.h:50, from ../../modules/video_output/opengl/sampler.h:28, from ../../modules/video_output/opengl/sampler.c:25: In function ‘snprintf’, inlined from ‘sampler_base_fetch_locations’ at ../../modules/video_output/opengl/sampler.c:271:9: /usr/include/bits/stdio2.h:54:10: note: ‘__builtin___snprintf_chk’ output between 12 and 21 bytes into a destination of size 12 54 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 55 | __glibc_objsize (__s), __fmt, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 56 | __va_arg_pack ()); | ~~~~~~~~~~~~~~~~~
562f1732