From 690bcb7b2c750ce6935e979c392395882d51744b Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 2 Oct 2010 14:22:03 +0000 Subject: libvo: remove UNUSED() macros Remove UNUSED macros used to shut up unused function parameter warnings. The macros are duplicated all over libvo and serve no useful purpose nowadays. A better way to shut up the warnings is -Wno-unused-parameter. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32422 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vesa_lvo.c | 8 -------- libvo/vo_cvidix.c | 9 --------- libvo/vo_svga.c | 8 -------- libvo/vo_vesa.c | 9 --------- libvo/vo_winvidix.c | 9 --------- libvo/vo_xover.c | 9 --------- libvo/vo_xvidix.c | 9 +-------- libvo/vo_xvmc.c | 3 --- 8 files changed, 1 insertion(+), 63 deletions(-) diff --git a/libvo/vesa_lvo.c b/libvo/vesa_lvo.c index cc77012c0b..4f4c796250 100644 --- a/libvo/vesa_lvo.c +++ b/libvo/vesa_lvo.c @@ -44,7 +44,6 @@ #define WIDTH_ALIGN 32 /* should be 16 for rage:422 and 32 for rage:420 */ #define NUM_FRAMES 10 -#define UNUSED(x) ((void)(x)) /**< Removes warning about unused arguments */ static uint8_t *frames[NUM_FRAMES]; @@ -226,13 +225,6 @@ static void vlvo_flip_page(void) #if 0 static void draw_alpha_null(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride) { - UNUSED(x0); - UNUSED(y0); - UNUSED(w); - UNUSED(h); - UNUSED(src); - UNUSED(srca); - UNUSED(stride); } static void draw_alpha(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride) diff --git a/libvo/vo_cvidix.c b/libvo/vo_cvidix.c index a4a29719de..593ded5887 100644 --- a/libvo/vo_cvidix.c +++ b/libvo/vo_cvidix.c @@ -49,8 +49,6 @@ static const vo_info_t info = { LIBVO_EXTERN(cvidix) -#define UNUSED(x) ((void)(x)) /* Removes warning about unused arguments */ - /* VIDIX related */ static char *vidix_name; static uint32_t swidth,sheight,sformat; @@ -136,18 +134,11 @@ static void flip_page(void){ } static int draw_slice(uint8_t *src[], int stride[],int w, int h, int x, int y){ - UNUSED(src); - UNUSED(stride); - UNUSED(w); - UNUSED(h); - UNUSED(x); - UNUSED(y); mp_msg(MSGT_VO, MSGL_FATAL, "vo_cvidix: error: didn't use vidix draw_slice!\n"); return -1; } static int draw_frame(uint8_t *src[]){ - UNUSED(src); mp_msg(MSGT_VO, MSGL_FATAL, "vo_cvidix: error: didn't use vidix draw_frame!\n"); return -1; } diff --git a/libvo/vo_svga.c b/libvo/vo_svga.c index 1435d1ecdc..c74cf61089 100644 --- a/libvo/vo_svga.c +++ b/libvo/vo_svga.c @@ -66,9 +66,6 @@ TODO: #include -//silence warnings, probably it have to go in some global header -#define UNUSED(x) ((void)(x)) - static void draw_alpha(int x0, int y0, int w, int h, unsigned char *src, unsigned char *srca, int stride); @@ -559,16 +556,11 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, static int draw_slice(uint8_t *image[],int stride[], int w, int h, int x, int y) { assert(0); - UNUSED(image);UNUSED(stride); - UNUSED(w);UNUSED(h); - UNUSED(x);UNUSED(y); - return VO_ERROR;//this is yv12 only -> vf_scale should do all transforms } static int draw_frame(uint8_t *src[]) { assert(0); - UNUSED(src); return VO_ERROR;//this one should not be called } diff --git a/libvo/vo_vesa.c b/libvo/vo_vesa.c index 024037fd70..8c367586ee 100644 --- a/libvo/vo_vesa.c +++ b/libvo/vo_vesa.c @@ -64,8 +64,6 @@ #define MAX_BUFFERS 3 -#define UNUSED(x) ((void)(x)) /**< Removes warning about unused arguments */ - static const vo_info_t info = { "VESA VBE 2.0 video output", @@ -345,13 +343,6 @@ static void draw_alpha_15(int x0,int y0, int w,int h, unsigned char* src, unsign static void draw_alpha_null(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride) { - UNUSED(x0); - UNUSED(y0); - UNUSED(w); - UNUSED(h); - UNUSED(src); - UNUSED(srca); - UNUSED(stride); } diff --git a/libvo/vo_winvidix.c b/libvo/vo_winvidix.c index 3c3f0419d8..7510bd0fd5 100644 --- a/libvo/vo_winvidix.c +++ b/libvo/vo_winvidix.c @@ -52,8 +52,6 @@ static const vo_info_t info = LIBVO_EXTERN(winvidix) -#define UNUSED(x) ((void)(x)) /* Removes warning about unused arguments */ - /* VIDIX related */ static char *vidix_name; @@ -295,18 +293,11 @@ static void flip_page(void){ } static int draw_slice(uint8_t *src[], int stride[],int w, int h, int x, int y){ - UNUSED(src); - UNUSED(stride); - UNUSED(w); - UNUSED(h); - UNUSED(x); - UNUSED(y); mp_msg(MSGT_VO, MSGL_FATAL, "[winvidix] error: didn't use vidix draw_slice!\n"); return -1; } static int draw_frame(uint8_t *src[]){ - UNUSED(src); mp_msg(MSGT_VO, MSGL_FATAL, "[winvidix] error: didn't use vidix draw_frame!\n"); return -1; } diff --git a/libvo/vo_xover.c b/libvo/vo_xover.c index dd7bceadb1..644e99910f 100644 --- a/libvo/vo_xover.c +++ b/libvo/vo_xover.c @@ -59,8 +59,6 @@ static const vo_info_t info = LIBVO_EXTERN(xover) -#define UNUSED(x) ((void)(x)) /* Removes warning about unused arguments */ - /* X11 related variables */ /* Colorkey handling */ static int colorkey; @@ -340,19 +338,12 @@ static void flip_page(void) static int draw_slice(uint8_t *src[], int stride[], int w, int h, int x, int y) { - UNUSED(src); - UNUSED(stride); - UNUSED(w); - UNUSED(h); - UNUSED(x); - UNUSED(y); mp_msg(MSGT_VO, MSGL_FATAL, "xover error: didn't used sub vo draw_slice!\n"); return 1; } static int draw_frame(uint8_t *src[]) { - UNUSED(src); mp_msg(MSGT_VO, MSGL_FATAL, "xover error: didn't used sub vo draw_frame!\n"); return 1; } diff --git a/libvo/vo_xvidix.c b/libvo/vo_xvidix.c index c7481ae613..f6c39f9f77 100644 --- a/libvo/vo_xvidix.c +++ b/libvo/vo_xvidix.c @@ -57,7 +57,7 @@ static const vo_info_t info = { }; LIBVO_EXTERN(xvidix) -#define UNUSED(x) ((void)(x)) /* Removes warning about unused arguments */ + /* X11 related variables */ /* Colorkey handling */ static int colorkey; @@ -339,12 +339,6 @@ static void flip_page(void) static int draw_slice(uint8_t * src[], int stride[], int w, int h, int x, int y) { - UNUSED(src); - UNUSED(stride); - UNUSED(w); - UNUSED(h); - UNUSED(x); - UNUSED(y); mp_msg(MSGT_VO, MSGL_FATAL, "[xvidix] error: didn't used vidix draw_slice!\n"); return -1; @@ -352,7 +346,6 @@ static int draw_slice(uint8_t * src[], int stride[], static int draw_frame(uint8_t * src[]) { - UNUSED(src); mp_msg(MSGT_VO, MSGL_FATAL, "[xvidix] error: didn't used vidix draw_frame!\n"); return -1; diff --git a/libvo/vo_xvmc.c b/libvo/vo_xvmc.c index 2d33847019..252a2cf87f 100644 --- a/libvo/vo_xvmc.c +++ b/libvo/vo_xvmc.c @@ -59,8 +59,6 @@ #include -#define UNUSED(x) ((void)(x)) - #if LIBAVCODEC_BUILD < ((51<<16)+(40<<8)+2) #error You need at least libavcodec v51.40.2 #endif @@ -672,7 +670,6 @@ skip_surface_allocation: } static int draw_frame(uint8_t *srcp[]){ - UNUSED(srcp); assert(0); } -- cgit v1.2.3