From b68f9fef32971095836ea6bbeb2f12af417120d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Wed, 4 May 2011 22:12:55 +0200 Subject: cleanup: shut up more warnings --- sub/font_load.c | 3 ++- sub/font_load_ft.c | 12 +++++++----- sub/spudec.c | 2 +- sub/sub.c | 4 +--- 4 files changed, 11 insertions(+), 10 deletions(-) (limited to 'sub') diff --git a/sub/font_load.c b/sub/font_load.c index e9980b8e41..7bf7775501 100644 --- a/sub/font_load.c +++ b/sub/font_load.c @@ -27,6 +27,7 @@ #include "font_load.h" #include "mp_msg.h" +#include "libavutil/attributes.h" raw_file* load_raw(char *name,int verbose){ int bpp; @@ -76,7 +77,7 @@ char section[64]; int i,j; int chardb=0; int fontdb=-1; -int version=0; +int version av_unused; int first=1; desc=malloc(sizeof(font_desc_t));if(!desc) goto fail_out; diff --git a/sub/font_load_ft.c b/sub/font_load_ft.c index 41a0f886cb..a501cfc750 100644 --- a/sub/font_load_ft.c +++ b/sub/font_load_ft.c @@ -131,8 +131,9 @@ static void paste_bitmap(unsigned char *bbuffer, FT_Bitmap *bitmap, int x, int y static int check_font(font_desc_t *desc, float ppem, int padding, int pic_idx, - int charset_size, FT_ULong *charset, FT_ULong *charcodes, - int unicode) { + int charset_size, const FT_ULong *charset, + const FT_ULong *charcodes, int unicode) +{ FT_Error error; FT_Face face = desc->faces[pic_idx]; int const load_flags = FT_LOAD_DEFAULT; @@ -611,9 +612,10 @@ void render_one_glyph(font_desc_t *desc, int c) } -static int prepare_font(font_desc_t *desc, FT_Face face, float ppem, int pic_idx, - int charset_size, FT_ULong *charset, FT_ULong *charcodes, int unicode, - double thickness, double radius) +static int prepare_font(font_desc_t *desc, FT_Face face, float ppem, + int pic_idx, int charset_size, + const FT_ULong *charset, const FT_ULong *charcodes, + int unicode, double thickness, double radius) { int i, err; int padding = ceil(radius) + ceil(thickness); diff --git a/sub/spudec.c b/sub/spudec.c index dbf956bb25..48e219a930 100644 --- a/sub/spudec.c +++ b/sub/spudec.c @@ -872,7 +872,7 @@ static void sws_spu_image(unsigned char *d1, unsigned char *d2, int dw, int dh, ctx=sws_getContext(sw, sh, PIX_FMT_GRAY8, dw, dh, PIX_FMT_GRAY8, SWS_GAUSS, &filter, NULL, NULL); sws_scale(ctx,&s1,&ss,0,sh,&d1,&ds); for (i=ss*sh-1; i>=0; i--) if (!s2[i]) s2[i] = 255; //else s2[i] = 1; - sws_scale(ctx,&s2,&ss,0,sh,&d2,&ds); + sws_scale(ctx,(const uint8_t **)&s2,&ss,0,sh,&d2,&ds); for (i=ds*dh-1; i>=0; i--) if (d2[i]==0) d2[i] = 1; else if (d2[i]==255) d2[i] = 0; sws_freeContext(ctx); } diff --git a/sub/sub.c b/sub/sub.c index 3edbb025d2..880793373c 100644 --- a/sub/sub.c +++ b/sub/sub.c @@ -673,7 +673,6 @@ inline static void vo_update_text_sub(struct osd_state *osd, mp_osd_obj_t* obj,i unsigned char *t; int c,i,j,l,x,y,font,prevc,counter; int k; - int lastStripPosition; int xsize; int xmin=dxs,xmax=0; int h,lasth; @@ -693,12 +692,11 @@ inline static void vo_update_text_sub(struct osd_state *osd, mp_osd_obj_t* obj,i // too long lines divide into a smaller ones i=k=lasth=0; h=sub_font->height; - lastStripPosition=-1; l=vo_sub->lines; { struct osd_text_t *osl, *cp_ott, *tmp_ott, *tmp; - struct osd_text_p *otp_sub = NULL, *otp_sub_tmp, // these are used to store the whole sub text osd + struct osd_text_p *otp_sub = NULL, *otp_sub_tmp = NULL, // these are used to store the whole sub text osd *otp, *tmp_otp, *pmt; // these are used to manage sub text osd coming from a single sub line int *char_seq, char_position, xlimit = dxs * sub_width_p / 100, counter; -- cgit v1.2.3