[vlc-commits] display: fix a few warnings

Johan Gunnarsson git at videolan.org
Thu Jan 17 08:33:42 CET 2019


vlc | branch: master | Johan Gunnarsson <johan.gunnarsson at gmail.com> | Wed Jan 16 22:07:33 2019 +0100| [3668542df0656e9c5a6d958695ee34646b1ae638] | committer: Steve Lhomme

display: fix a few warnings

video_output/display.c: In function ‘vout_display_TranslateMouseState’:
video_output/display.c:262:23: warning: ‘y’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         + (int64_t)(y - place.y) * vd->source.i_visible_height / place.height;
                    ~~~^~~~~~~~~~
video_output/display.c:260:23: warning: ‘x’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         + (int64_t)(x - place.x) * vd->source.i_visible_width / place.width;
                    ~~~^~~~~~~~~~

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

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

 src/video_output/display.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/video_output/display.c b/src/video_output/display.c
index be744e0b98..0b34e8277f 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -254,6 +254,8 @@ void vout_display_TranslateMouseState(vout_display_t *vd, vlc_mouse_t *video,
             x = place.height - wy;
             y = place.width - wx;
             break;
+        default:
+            vlc_assert_unreachable();
     }
 
     video->i_x = vd->source.i_x_offset



More information about the vlc-commits mailing list