[vlc-devel] [PATCH 1/2] kva: fix various warnings
KO Myung-Hun
komh78 at gmail.com
Sun Jan 31 12:04:35 UTC 2021
-----
CC video_output/kva.lo
video_output/kva.c:159:5: warning: initialization of 'void (*)(vout_display_t *)' {aka 'void (*)(struct vout_display_t *)'} from incompatible pointer type 'void (*)(vlc_object_t *)' {aka 'void (*)(struct vlc_object_t *)'} [-Wincompatible-pointer-types]
159 | Close, Prepare, Display, Control, NULL, NULL,
| ^~~~~
video_output/kva.c:159:5: note: (near initialization for 'ops.close')
video_output/kva.c: In function 'PMThread':
video_output/kva.c:167:32: warning: unused variable 'cfg' [-Wunused-variable]
167 | const vout_display_cfg_t * cfg = init->cfg;
| ^~~
video_output/kva.c:466:13: warning: 'DestroyPicture' defined but not used [-Wunused-function]
466 | static void DestroyPicture( picture_t *pic )
| ^~~~~~~~~~~~~~
-----
---
modules/video_output/kva.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/modules/video_output/kva.c b/modules/video_output/kva.c
index 38fa658329..ce070b3975 100644
--- a/modules/video_output/kva.c
+++ b/modules/video_output/kva.c
@@ -44,7 +44,7 @@
*****************************************************************************/
static int Open ( vout_display_t *, const vout_display_cfg_t *,
video_format_t *, vlc_video_context * );
-static void Close( vlc_object_t * );
+static void Close( vout_display_t * );
#define KVA_FIXT23_TEXT N_( \
"Enable a workaround for T23" )
@@ -164,7 +164,6 @@ static void PMThread( void *arg )
struct open_init *init = ( struct open_init * )arg;
vout_display_t *vd = init->vd;
vout_display_sys_t * sys = vd->sys;
- const vout_display_cfg_t * cfg = init->cfg;
video_format_t *fmtp = init->fmtp;
ULONG i_frame_flags;
QMSG qm;
@@ -322,7 +321,6 @@ static int Open ( vout_display_t *vd, const vout_display_cfg_t *cfg,
vout_display_sys_t *sys;
struct open_init init = {
.vd = vd,
- .cfg = cfg,
.fmtp = fmtp,
};
VLC_UNUSED(context);
@@ -365,9 +363,8 @@ static int Open ( vout_display_t *vd, const vout_display_cfg_t *cfg,
*****************************************************************************
* Terminate an output method created by Open
*****************************************************************************/
-static void Close ( vlc_object_t *object )
+static void Close ( vout_display_t *vd )
{
- vout_display_t * vd = (vout_display_t *)object;
vout_display_sys_t * sys = vd->sys;
WinPostQueueMsg( sys->hmq, WM_QUIT, 0, 0 );
@@ -463,11 +460,6 @@ static int Control( vout_display_t *vd, int query )
/* following functions are local */
-static void DestroyPicture( picture_t *pic )
-{
- free( pic->p_sys );
-}
-
/*****************************************************************************
* OpenDisplay: open and initialize KVA device
*****************************************************************************
--
2.22.0
More information about the vlc-devel
mailing list