Skip to content
Snippets Groups Projects
  1. Aug 02, 2023
  2. Aug 01, 2023
  3. Jul 31, 2023
  4. Jul 30, 2023
  5. Jul 29, 2023
    • Alexandre Janniaux's avatar
      opengl: sampler: limit the values of number of texture · 562f1732
      Alexandre Janniaux authored and Steve Lhomme's avatar Steve Lhomme committed
      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
    • Alexandre Janniaux's avatar
      opengl: interop_sw: remove unused priv variable · 1240743f
      Alexandre Janniaux authored and Steve Lhomme's avatar Steve Lhomme committed
      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
    • Alexandre Janniaux's avatar
      dvbsub: refactor to end label · 6b48cb21
      Alexandre Janniaux authored and Steve Lhomme's avatar Steve Lhomme committed
      6b48cb21
    • Alexandre Janniaux's avatar
      codec: dvbsub: refactor p_sys allocation · 35da430c
      Alexandre Janniaux authored and Steve Lhomme's avatar Steve Lhomme committed
      malloc returns a `void*` type which doesn't need a cast to a different
      pointer type. In addition, both the allocation and the success check was
      done at the same time, reducing the readability of the code.
      35da430c
    • Pierre Lamot's avatar
      60b6df1f
Loading