summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-11-06 23:54:29 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-11-06 23:54:29 +0000
commitf859d013a883bbba59901303f644fe281454a63d (patch)
treee71729f1990b98ab27a8672e92a656d622c5ab19 /libvo
parentd1d7c653674e32de3a4aa47ee4068c57b288adb7 (diff)
downloadmpv-f859d013a883bbba59901303f644fe281454a63d.tar.bz2
mpv-f859d013a883bbba59901303f644fe281454a63d.tar.xz
*HUGE* set of compiler warning fixes, unused variables removal
based on patch by Dominik Mierzejewski <dominik@rangers.eu.org> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8124 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/aclib.c2
-rw-r--r--libvo/font_load_ft.c4
-rw-r--r--libvo/geometry.c5
-rw-r--r--libvo/mga_common.c7
-rw-r--r--libvo/sub.c5
-rw-r--r--libvo/vo_dga.c7
-rw-r--r--libvo/vo_dxr3.c4
-rw-r--r--libvo/vo_gif89a.c3
-rw-r--r--libvo/vo_gl2.c11
-rw-r--r--libvo/vo_null.c1
-rw-r--r--libvo/vo_sdl.c3
-rw-r--r--libvo/vo_tdfxfb.c1
-rw-r--r--libvo/vo_xvidix.c2
-rw-r--r--libvo/vosub_vidix.h1
-rw-r--r--libvo/x11_common.c1
15 files changed, 32 insertions, 25 deletions
diff --git a/libvo/aclib.c b/libvo/aclib.c
index 858c77495a..bd089f6e34 100644
--- a/libvo/aclib.c
+++ b/libvo/aclib.c
@@ -9,6 +9,7 @@
*/
#include <stddef.h>
#include "../cpudetect.h"
+#include "fastmemcpy.h"
#define BLOCK_SIZE 4096
#define CONFUSION_FACTOR 0
@@ -177,6 +178,7 @@ void * mem2agpcpy(void * to, const void * from, size_t len)
#endif
#endif //!RUNTIME_CPUDETECT
+ return to;
}
#endif /* use fastmemcpy */
diff --git a/libvo/font_load_ft.c b/libvo/font_load_ft.c
index 72770f2f52..b829f6d00e 100644
--- a/libvo/font_load_ft.c
+++ b/libvo/font_load_ft.c
@@ -732,7 +732,7 @@ static FT_ULong decode_char(iconv_t *cd, char c) {
int inbytesleft = 1;
int outbytesleft = sizeof(FT_ULong);
- size_t count = iconv(*cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
+ iconv(*cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
/* convert unicode BigEndian -> MachineEndian */
o = be2me_32(o);
@@ -785,7 +785,9 @@ static int prepare_charset(char *charmap, char *encoding, FT_ULong *charset, FT_
}
static int prepare_charset_unicode(FT_Face face, FT_ULong *charset, FT_ULong *charcodes) {
+#ifdef HAVE_FREETYPE21
FT_ULong charcode;
+#endif
FT_UInt gindex;
int i,j;
diff --git a/libvo/geometry.c b/libvo/geometry.c
index 26afd69547..1823a7b4c2 100644
--- a/libvo/geometry.c
+++ b/libvo/geometry.c
@@ -2,7 +2,9 @@
#include "geometry.h"
#include "../mp_msg.h"
+// #include "../mplayer.h" /* exit_player() */
#include <string.h>
+#include <stdlib.h> /* strtol */
/* A string of the form xpos[%]:ypos[%] */
char *vo_geometry = NULL;
@@ -53,7 +55,7 @@ int geometry(int *xpos, int *ypos, int scrw, int scrh, int vidw, int vidh, int f
return geometry_error();
}
- if(*colpos != '\0')
+ if(*colpos != '\0') {
if(vo_geometry[glen - 1] == '%') {
if(!get_num(colpos + 1, &yper, vo_geometry + glen - 1))
return geometry_error();
@@ -61,6 +63,7 @@ int geometry(int *xpos, int *ypos, int scrw, int scrh, int vidw, int vidh, int f
if(!get_num(colpos + 1, ypos, vo_geometry + glen))
return geometry_error();
}
+ }
if(xper)
*xpos = (scrw - vidw) * ((float)xper / 100.0);
diff --git a/libvo/mga_common.c b/libvo/mga_common.c
index cc9e59b47f..193569fdf0 100644
--- a/libvo/mga_common.c
+++ b/libvo/mga_common.c
@@ -16,7 +16,10 @@ static mga_vid_config_t mga_vid_config;
static uint8_t *vid_data, *frames[4];
static int f = -1;
-static uint32_t drwX,drwY,drwWidth,drwHeight,drwBorderWidth,drwDepth;
+static uint32_t drwX,drwY,drwWidth,drwHeight;
+#ifdef VO_XMGA
+static uint32_t drwBorderWidth,drwDepth;
+#endif
static uint32_t drwcX,drwcY,dwidth,dheight;
static void draw_alpha(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){
@@ -324,7 +327,7 @@ static uint32_t control(uint32_t request, void *data, ...)
case VOCTRL_SET_PANSCAN:
if ( vo_fs && ( vo_panscan != vo_panscan_amount ) ) // || ( !vo_fs && vo_panscan_amount ) )
{
- int old_y = vo_panscan_y;
+// int old_y = vo_panscan_y;
panscan_calc();
// if ( old_y != vo_panscan_y )
set_window();
diff --git a/libvo/sub.c b/libvo/sub.c
index 90dd6c6869..67003cf9a1 100644
--- a/libvo/sub.c
+++ b/libvo/sub.c
@@ -4,6 +4,10 @@
#include <string.h>
#include "config.h"
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+
#include "mp_msg.h"
#include "video_out.h"
#include "font_load.h"
@@ -434,7 +438,6 @@ inline static void vo_update_text_sub(mp_osd_obj_t* obj,int dxs,int dys){
inline static void vo_update_spudec_sub(mp_osd_obj_t* obj, int dxs, int dys)
{
unsigned int bbox[4];
- int i;
spudec_calc_bbox(vo_spudec, dxs, dys, bbox);
obj->bbox.x1 = bbox[0];
obj->bbox.x2 = bbox[1];
diff --git a/libvo/vo_dga.c b/libvo/vo_dga.c
index 9abb50fbc3..8b0d3962f3 100644
--- a/libvo/vo_dga.c
+++ b/libvo/vo_dga.c
@@ -246,9 +246,6 @@ static int vo_dga_src_height; // height of video in pixels
static int vo_dga_src_offset=0; // offset in src
static int vo_dga_vp_offset=0; // offset in dest
static int vo_dga_bytes_per_line; // bytes per line to copy
-static int vo_dga_src_skip; // bytes to skip after copying one
- // line
- // (not supported yet) in src
static int vo_dga_vp_skip; // dto. for dest
static int vo_dga_lines; // num of lines to copy
static int vo_dga_hw_mode = 0; // index in mode list that is actually
@@ -333,7 +330,6 @@ static void fillblock(char *strt, int yoff, int lines, int val){
static uint32_t draw_frame( uint8_t *src[] ){
int vp_skip = vo_dga_vp_skip;
- int lpl = vo_dga_bytes_per_line >> 2;
int numlines = vo_dga_lines;
char *s, *d;
@@ -366,7 +362,6 @@ static uint32_t draw_frame( uint8_t *src[] ){
case VDM_CONV_15TO16:
{
int i;
- char *e;
for(i=0; i< vo_dga_lines; i++){
rgb15to16( s, d, vo_dga_bytes_per_line);
d+=vo_dga_bytes_per_line;
@@ -400,7 +395,7 @@ static uint32_t draw_frame( uint8_t *src[] ){
static void check_events(void)
{
- int e=vo_x11_check_events(mDisplay);
+ vo_x11_check_events(mDisplay);
}
//---------------------------------------------------------
diff --git a/libvo/vo_dxr3.c b/libvo/vo_dxr3.c
index ad15b0bb2f..0d187ed974 100644
--- a/libvo/vo_dxr3.c
+++ b/libvo/vo_dxr3.c
@@ -108,9 +108,11 @@
#include <stdio.h>
#include <time.h>
#include <math.h>
-#include <malloc.h>
#include "config.h"
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
#include "fastmemcpy.h"
#include "video_out.h"
diff --git a/libvo/vo_gif89a.c b/libvo/vo_gif89a.c
index f883612651..4cb9b8b0ad 100644
--- a/libvo/vo_gif89a.c
+++ b/libvo/vo_gif89a.c
@@ -120,6 +120,9 @@ static const vo_info_t* get_info(void)
return &vo_info;
}
+/* forward declaration */
+int gif_reduce(int width, int height, unsigned char *source, unsigned char *destination, unsigned char *palette);
+
static uint32_t draw_frame(uint8_t * src[])
{
uint8_t *use_data;
diff --git a/libvo/vo_gl2.c b/libvo/vo_gl2.c
index a10567ed84..2a12f555c5 100644
--- a/libvo/vo_gl2.c
+++ b/libvo/vo_gl2.c
@@ -15,6 +15,7 @@
#include "config.h"
#include "video_out.h"
#include "video_out_internal.h"
+#include "sub.h"
LIBVO_EXTERN(gl2)
@@ -61,14 +62,6 @@ static unsigned char *ImageData=NULL;
//static int texture_id=1;
static GLXContext wsGLXContext;
-static int wsGLXAttrib[] = { GLX_RGBA,
- GLX_RED_SIZE,1,
- GLX_GREEN_SIZE,1,
- GLX_BLUE_SIZE,1,
- GLX_ALPHA_SIZE,0,
- GLX_DOUBLEBUFFER,
- None };
-
static uint32_t image_width;
static uint32_t image_height;
@@ -606,7 +599,7 @@ static int choose_glx_visual(Display *dpy, int scr, XVisualInfo *res_vi)
template.screen = scr;
vi_list = XGetVisualInfo(dpy, VisualScreenMask, &template, &vi_num);
if (!vi_list) return -1;
- best_weight = 1000000;
+ best_weight = 1000000; best_i=0;
for (i = 0; i < vi_num; i++) {
int val, res, w = 0;
/* of course, the visual must support OpenGL rendering... */
diff --git a/libvo/vo_null.c b/libvo/vo_null.c
index a977b66c4a..9cec3f96c7 100644
--- a/libvo/vo_null.c
+++ b/libvo/vo_null.c
@@ -23,6 +23,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <errno.h>
#include "config.h"
#include "video_out.h"
diff --git a/libvo/vo_sdl.c b/libvo/vo_sdl.c
index e911a117b4..ef2b7f0faf 100644
--- a/libvo/vo_sdl.c
+++ b/libvo/vo_sdl.c
@@ -1139,8 +1139,6 @@ static uint32_t draw_slice(uint8_t *image[], int stride[], int w,int h,int x,int
{
struct sdl_priv_s *priv = &sdl_priv;
uint8_t *dst;
- uint8_t *src;
- int i;
SDL_OVR_LOCK(-1)
@@ -1195,7 +1193,6 @@ static void check_events (void)
struct sdl_priv_s *priv = &sdl_priv;
SDL_Event event;
SDLKey keypressed = 0;
- static int modifiers = 0;
/* Poll the waiting SDL Events */
while ( SDL_PollEvent(&event) ) {
diff --git a/libvo/vo_tdfxfb.c b/libvo/vo_tdfxfb.c
index f74a25fd30..443972a849 100644
--- a/libvo/vo_tdfxfb.c
+++ b/libvo/vo_tdfxfb.c
@@ -43,6 +43,7 @@
#include "video_out_internal.h"
#include "drivers/3dfx.h"
#include "aspect.h"
+#include "sub.h"
LIBVO_EXTERN(tdfxfb)
diff --git a/libvo/vo_xvidix.c b/libvo/vo_xvidix.c
index 19fd6e1981..df149e987a 100644
--- a/libvo/vo_xvidix.c
+++ b/libvo/vo_xvidix.c
@@ -195,7 +195,7 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width,
uint32_t d_height, uint32_t flags, char *title, uint32_t format)
{
XVisualInfo vinfo;
- XSizeHints hint;
+// XSizeHints hint;
XSetWindowAttributes xswa;
unsigned long xswamask;
XWindowAttributes attribs;
diff --git a/libvo/vosub_vidix.h b/libvo/vosub_vidix.h
index 7a68bcfe0c..0fe70a63c8 100644
--- a/libvo/vosub_vidix.h
+++ b/libvo/vosub_vidix.h
@@ -21,6 +21,7 @@ int vidix_init(unsigned src_width,unsigned src_height,
int vidix_start(void);
int vidix_stop(void);
void vidix_term( void );
+uint32_t vidix_control(uint32_t request, void *data, ...);
uint32_t vidix_query_fourcc(unsigned fourcc);
uint32_t vidix_draw_slice(uint8_t *image[], int stride[], int w,int h,int x,int y);
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index dd9c17de3b..fc6e08641d 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -1103,6 +1103,7 @@ uint32_t vo_x11_get_equalizer(char *name, int *value)
else if (!strcasecmp(name, "contrast")) *value = vo_contrast;
else if (!strcasecmp(name, "gamma")) *value = vo_gamma;
else return VO_NOTIMPL;
+ return VO_TRUE;
}