[vlc-commits] [Git][videolan/vlc][master] 4 commits: opengl: gl_util: fix -Wsign-compare warning

François Cartegnie (@fcartegnie) gitlab at videolan.org
Sun Dec 24 08:47:57 UTC 2023



François Cartegnie pushed to branch master at VideoLAN / VLC


Commits:
6c7a7cbf by Alexandre Janniaux at 2023-12-24T08:31:36+00:00
opengl: gl_util: fix -Wsign-compare warning

    ../../test/../modules/video_output/opengl/gl_util.c: In function ‘LogProgramErrors’:
    ../../test/../modules/video_output/opengl/gl_util.c:121:23: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘GLsizei’ {aka ‘int’} [-Wsign-compare]
      121 |     for (size_t i=0; i<shader_count; ++i)
          |                       ^

- - - - -
f607b17a by Alexandre Janniaux at 2023-12-24T08:31:36+00:00
opengl: interop: fix unused parameter warning

    ../../test/../modules/video_output/opengl/interop.c: In function ‘LoadInterop’:
    ../../test/../modules/video_output/opengl/interop.c:154:30: warning: unused parameter ‘forced’ [-Wunused-parameter]
      154 | LoadInterop(void *func, bool forced, va_list args)
          |                              ^

- - - - -
e90a1ba1 by Alexandre Janniaux at 2023-12-24T08:31:36+00:00
xcb: render: fix unused variable warning

    ../../modules/video_output/xcb/render.c: In function ‘Open’:
    ../../modules/video_output/xcb/render.c:610:48: warning: unused variable ‘d’ [-Wunused-variable]
      610 |         const xcb_render_directformat_t *const d = &pic_fmt->direct;
          |                                                ^

- - - - -
51ebebd2 by Alexandre Janniaux at 2023-12-24T08:31:36+00:00
stream_output: fix unused variable warning

    ../../src/stream_output/stream_output.c: In function ‘sout_StreamDelete’:
    ../../src/stream_output/stream_output.c:766:33: warning: unused variable ‘priv’ [-Wunused-variable]
      766 |     struct sout_stream_private *priv = sout_stream_priv(p_stream);
          |                                 ^~~~

- - - - -


4 changed files:

- modules/video_output/opengl/gl_util.c
- modules/video_output/opengl/interop.c
- modules/video_output/xcb/render.c
- src/stream_output/stream_output.c


Changes:

=====================================
modules/video_output/opengl/gl_util.c
=====================================
@@ -118,7 +118,7 @@ LogProgramErrors(vlc_object_t *obj, const opengl_vtable_t *vt, GLuint id)
     GLsizei shader_count;
     GLuint shaders[3];
     vt->GetAttachedShaders(id, 2, &shader_count, shaders);
-    for (size_t i=0; i<shader_count; ++i)
+    for (GLsizei i = 0; i < shader_count; ++i)
     {
         GLint shader_type;
         vt->GetShaderiv(shaders[i], GL_SHADER_TYPE, &shader_type);


=====================================
modules/video_output/opengl/interop.c
=====================================
@@ -153,6 +153,7 @@ static int GetTexFormatSize(struct vlc_gl_interop *interop, GLenum target,
 static int
 LoadInterop(void *func, bool forced, va_list args)
 {
+    (void)forced;
     vlc_gl_interop_probe start = func;
     struct vlc_gl_interop *interop = va_arg(args, struct vlc_gl_interop *);
     return start(interop);


=====================================
modules/video_output/xcb/render.c
=====================================
@@ -607,7 +607,6 @@ static int Open(vout_display_t *vd,
 
     for (unsigned i = 0; i < pic_fmt_r->num_formats; i++) {
         const xcb_render_pictforminfo_t *const pic_fmt = pic_fmts + i;
-        const xcb_render_directformat_t *const d = &pic_fmt->direct;
 
         if (pic_fmt->depth == 8 && pic_fmt->direct.alpha_mask == 0xff) {
             /* Alpha mask format */


=====================================
src/stream_output/stream_output.c
=====================================
@@ -763,7 +763,6 @@ int sout_StreamControlVa(sout_stream_t *s, int i_query, va_list args)
 /* Destroy a "stream_out" module */
 static void sout_StreamDelete( sout_stream_t *p_stream )
 {
-    struct sout_stream_private *priv = sout_stream_priv(p_stream);
     char *psz_name = p_stream->psz_name;
 
     msg_Dbg( p_stream, "destroying chain... (name=%s)", psz_name ? psz_name



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/a3bd36a5f30a122ea6c8e194a131bc39af6ca959...51ebebd2c4dc065793345a8c0866e02478e6a0a0

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/a3bd36a5f30a122ea6c8e194a131bc39af6ca959...51ebebd2c4dc065793345a8c0866e02478e6a0a0
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list