[vlc-commits] hw: vaapi: fix a few warnings

Johan Gunnarsson git at videolan.org
Fri Jan 18 08:36:53 CET 2019


vlc | branch: master | Johan Gunnarsson <johan.gunnarsson at gmail.com> | Thu Jan 17 20:40:04 2019 +0100| [981a31858ff30f0d0371a08123b0dfbe46c781ac] | committer: Steve Lhomme

hw: vaapi: fix a few warnings

hw/vaapi/filters.c:296:9: warning: variable 'pipeline_buf' is used uninitialized whenever 'if' condition is true
      [-Wsometimes-uninitialized]
    if (vlc_vaapi_BeginPicture(VLC_OBJECT(filter),
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hw/vaapi/filters.c:344:9: note: uninitialized use occurs here
    if (pipeline_buf != VA_INVALID_ID)
        ^~~~~~~~~~~~
hw/vaapi/filters.c:296:5: note: remove the 'if' if its condition is always false
    if (vlc_vaapi_BeginPicture(VLC_OBJECT(filter),
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hw/vaapi/filters.c:292:9: warning: variable 'pipeline_buf' is used uninitialized whenever 'if' condition is true
      [-Wsometimes-uninitialized]
    if (vlc_vaapi_UnmapBuffer(VLC_OBJECT(filter),
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hw/vaapi/filters.c:344:9: note: uninitialized use occurs here
    if (pipeline_buf != VA_INVALID_ID)
        ^~~~~~~~~~~~
hw/vaapi/filters.c:292:5: note: remove the 'if' if its condition is always false
    if (vlc_vaapi_UnmapBuffer(VLC_OBJECT(filter),
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hw/vaapi/filters.c:285:9: warning: variable 'pipeline_buf' is used uninitialized whenever 'if' condition is true
      [-Wsometimes-uninitialized]
    if (vlc_vaapi_MapBuffer(VLC_OBJECT(filter), filter_sys->va.dpy,
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hw/vaapi/filters.c:344:9: note: uninitialized use occurs here
    if (pipeline_buf != VA_INVALID_ID)
        ^~~~~~~~~~~~
hw/vaapi/filters.c:285:5: note: remove the 'if' if its condition is always false
    if (vlc_vaapi_MapBuffer(VLC_OBJECT(filter), filter_sys->va.dpy,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hw/vaapi/filters.c:304:5: note: variable 'pipeline_buf' is declared here
    VABufferID                          pipeline_buf = VA_INVALID_ID;
    ^
9 warnings generated.

Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=981a31858ff30f0d0371a08123b0dfbe46c781ac
---

 modules/hw/vaapi/filters.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/hw/vaapi/filters.c b/modules/hw/vaapi/filters.c
index a27b102376..482321d969 100644
--- a/modules/hw/vaapi/filters.c
+++ b/modules/hw/vaapi/filters.c
@@ -273,6 +273,7 @@ Filter(filter_t * filter, picture_t * src,
                                          VAProcPipelineParameterBuffer *))
 {
     filter_sys_t *const filter_sys = filter->p_sys;
+    VABufferID          pipeline_buf = VA_INVALID_ID;
     picture_t *const    dest = picture_pool_Wait(filter_sys->dest_pics);
     if (!dest)
         return NULL;
@@ -301,7 +302,6 @@ Filter(filter_t * filter, picture_t * src,
     if (pf_prepare_render_surface)
         pf_prepare_render_surface(filter_sys->p_data);
 
-    VABufferID                          pipeline_buf = VA_INVALID_ID;
     VAProcPipelineParameterBuffer *     pipeline_params;
 
     pipeline_buf =



More information about the vlc-commits mailing list