[vlc-devel] [PATCH v2] Fixed unused variable and parameter warnings.
Jean-Baptiste Kempf
jb at videolan.org
Sun Dec 1 19:22:17 CET 2013
Partly applied.
I did not apply the transcode one, because of the commented msg_Dbg.
I did not apply the freetype one, because we need to extend mono to
other platforms.
On 23 Nov, Maxim Bublis wrote :
> ---
> lib/media.c | 1 +
> modules/gui/eject.c | 1 +
> modules/stream_out/transcode/video.c | 1 +
> modules/text_renderer/freetype.c | 3 ++-
> modules/video_chroma/copy.c | 1 +
> src/posix/filesystem.c | 5 ++++-
> 6 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/lib/media.c b/lib/media.c
> index 7acfb69..d3b9ff9 100644
> --- a/lib/media.c
> +++ b/lib/media.c
> @@ -125,6 +125,7 @@ static void input_item_subitem_added( const vlc_event_t *p_event,
> static void input_item_subitemtree_added( const vlc_event_t * p_event,
> void * user_data )
> {
> + VLC_UNUSED( p_event );
> libvlc_media_t * p_md = user_data;
> libvlc_event_t event;
>
> diff --git a/modules/gui/eject.c b/modules/gui/eject.c
> index 6a74bdb..e4109aa 100644
> --- a/modules/gui/eject.c
> +++ b/modules/gui/eject.c
> @@ -174,6 +174,7 @@ static int intf_Eject( vlc_object_t *p_this, const char *psz_device )
> return VLC_SUCCESS;
>
> #else
> + VLC_UNUSED( psz_device );
> msg_Warn( p_this, "CD-Rom ejection unsupported on this platform" );
> return VLC_EGENERIC;
> #endif
> diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
> index a92f038..ada0166 100644
> --- a/modules/stream_out/transcode/video.c
> +++ b/modules/stream_out/transcode/video.c
> @@ -653,6 +653,7 @@ void transcode_video_close( sout_stream_t *p_stream,
>
> static void OutputFrame( sout_stream_sys_t *p_sys, picture_t *p_pic, sout_stream_t *p_stream, sout_stream_id_t *id, block_t **out )
> {
> + VLC_UNUSED( p_stream );
>
> picture_t *p_pic2 = NULL;
> bool b_need_duplicate=false;
> diff --git a/modules/text_renderer/freetype.c b/modules/text_renderer/freetype.c
> index 2870aa3..62db1e7 100644
> --- a/modules/text_renderer/freetype.c
> +++ b/modules/text_renderer/freetype.c
> @@ -2198,7 +2198,7 @@ static int Create( vlc_object_t *p_this )
> char *psz_fontname = NULL;
> char *psz_monofontfile = NULL;
> char *psz_monofontfamily = NULL;
> - int i_error = 0, fontindex = 0, monofontindex = 0;
> + int i_error = 0, fontindex = 0;
>
> /* Allocate structure */
> p_filter->p_sys = p_sys = malloc( sizeof(*p_sys) );
> @@ -2278,6 +2278,7 @@ static int Create( vlc_object_t *p_this )
> p_sys->style.psz_fontname = psz_fontname;
> #ifdef HAVE_STYLES
> #ifdef HAVE_FONTCONFIG
> + int monofontindex = 0;
> FontConfig_BuildCache( p_filter );
>
> /* */
> diff --git a/modules/video_chroma/copy.c b/modules/video_chroma/copy.c
> index 5593d07..9eed17f 100644
> --- a/modules/video_chroma/copy.c
> +++ b/modules/video_chroma/copy.c
> @@ -172,6 +172,7 @@ static void SSE_SplitUV(uint8_t *dstu, size_t dstu_pitch,
> const uint8_t *src, size_t src_pitch,
> unsigned width, unsigned height, unsigned cpu)
> {
> + VLC_UNUSED(cpu);
> const uint8_t shuffle[] = { 0, 2, 4, 6, 8, 10, 12, 14,
> 1, 3, 5, 7, 9, 11, 13, 15 };
> const uint8_t mask[] = { 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00,
> diff --git a/src/posix/filesystem.c b/src/posix/filesystem.c
> index c5a8f88..246133b 100644
> --- a/src/posix/filesystem.c
> +++ b/src/posix/filesystem.c
> @@ -103,9 +103,12 @@ int vlc_openat (int dir, const char *filename, int flags, ...)
> if (fd != -1)
> fcntl (fd, F_SETFD, FD_CLOEXEC);
> #else
> + VLC_UNUSED (dir);
> + VLC_UNUSED (filename);
> + VLC_UNUSED (mode);
> +
> int fd = -1;
> errno = ENOSYS;
> - (void) mode;
> #endif
> return fd;
> }
> --
> 1.8.3.4 (Apple Git-47)
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
--
With my kindest regards,
--
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
More information about the vlc-devel
mailing list