[MPlayer-cvslog] r34580 - in trunk: drivers/tdfx_vid.c libmenu/menu.c libmpdemux/mpeg_hdr.c m_option.h stream/stream.h sub/sub.c vidix/nvidia_vid.c
diego
subversion at mplayerhq.hu
Thu Jan 19 15:36:15 CET 2012
Author: diego
Date: Thu Jan 19 15:36:15 2012
New Revision: 34580
Log:
Move static keyword to the beginning of function declarations.
This fixes a number of warnings with -Wextra.
Modified:
trunk/drivers/tdfx_vid.c
trunk/libmenu/menu.c
trunk/libmpdemux/mpeg_hdr.c
trunk/m_option.h
trunk/stream/stream.h
trunk/sub/sub.c
trunk/vidix/nvidia_vid.c
Modified: trunk/drivers/tdfx_vid.c
==============================================================================
--- trunk/drivers/tdfx_vid.c Thu Jan 19 15:36:11 2012 (r34579)
+++ trunk/drivers/tdfx_vid.c Thu Jan 19 15:36:15 2012 (r34580)
@@ -351,7 +351,7 @@ static void tdfx_vid_get_config(tdfx_vid
cfg->screen_start = tdfx_inl(VIDDESKSTART);
}
-inline static u32 tdfx_vid_make_format(int src,u16 stride,u32 fmt) {
+static inline u32 tdfx_vid_make_format(int src, u16 stride, u32 fmt) {
u32 r = stride & 0xFFF3;
u32 tdfx_fmt = 0;
Modified: trunk/libmenu/menu.c
==============================================================================
--- trunk/libmenu/menu.c Thu Jan 19 15:36:11 2012 (r34579)
+++ trunk/libmenu/menu.c Thu Jan 19 15:36:15 2012 (r34580)
@@ -374,7 +374,7 @@ int menu_read_key(menu_t* menu,int cmd)
typedef void (*draw_alpha_f)(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride);
-inline static draw_alpha_f get_draw_alpha(uint32_t fmt) {
+static inline draw_alpha_f get_draw_alpha(uint32_t fmt) {
switch(fmt) {
case IMGFMT_BGR12:
case IMGFMT_RGB12:
Modified: trunk/libmpdemux/mpeg_hdr.c
==============================================================================
--- trunk/libmpdemux/mpeg_hdr.c Thu Jan 19 15:36:11 2012 (r34579)
+++ trunk/libmpdemux/mpeg_hdr.c Thu Jan 19 15:36:15 2012 (r34580)
@@ -309,7 +309,7 @@ static unsigned int read_golomb(unsigned
return v2;
}
-inline static int read_golomb_s(unsigned char *buffer, unsigned int *init)
+static inline int read_golomb_s(unsigned char *buffer, unsigned int *init)
{
unsigned int v = read_golomb(buffer, init);
return (v & 1) ? ((v + 1) >> 1) : -(v >> 1);
Modified: trunk/m_option.h
==============================================================================
--- trunk/m_option.h Thu Jan 19 15:36:11 2012 (r34579)
+++ trunk/m_option.h Thu Jan 19 15:36:15 2012 (r34580)
@@ -490,13 +490,13 @@ struct m_option {
const m_option_t* m_option_list_find(const m_option_t* list,const char* name);
/// Helper to parse options, see \ref m_option_type::parse.
-inline static int
+static inline int
m_option_parse(const m_option_t* opt,const char *name, const char *param, void* dst, int src) {
return opt->type->parse(opt,name,param,dst,src);
}
/// Helper to print options, see \ref m_option_type::print.
-inline static char*
+static inline char*
m_option_print(const m_option_t* opt, const void* val_ptr) {
if(opt->type->print)
return opt->type->print(opt,val_ptr);
@@ -505,14 +505,14 @@ m_option_print(const m_option_t* opt, co
}
/// Helper around \ref m_option_type::save.
-inline static void
+static inline void
m_option_save(const m_option_t* opt,void* dst, const void* src) {
if(opt->type->save)
opt->type->save(opt,dst,src);
}
/// Helper around \ref m_option_type::set.
-inline static void
+static inline void
m_option_set(const m_option_t* opt,void* dst, const void* src) {
if(opt->type->set)
opt->type->set(opt,dst,src);
@@ -528,7 +528,7 @@ m_option_copy(const m_option_t* opt,void
}
/// Helper around \ref m_option_type::free.
-inline static void
+static inline void
m_option_free(const m_option_t* opt,void* dst) {
if(opt->type->free)
opt->type->free(dst);
Modified: trunk/stream/stream.h
==============================================================================
--- trunk/stream/stream.h Thu Jan 19 15:36:11 2012 (r34579)
+++ trunk/stream/stream.h Thu Jan 19 15:36:15 2012 (r34580)
@@ -191,7 +191,8 @@ int cache_stream_seek_long(stream_t *s,o
#endif
int stream_write_buffer(stream_t *s, unsigned char *buf, int len);
-inline static int stream_read_char(stream_t *s){
+static inline int stream_read_char(stream_t *s)
+{
return (s->buf_pos<s->buf_len)?s->buffer[s->buf_pos++]:
(cache_stream_fill_buffer(s)?s->buffer[s->buf_pos++]:-256);
// if(s->buf_pos<s->buf_len) return s->buffer[s->buf_pos++];
@@ -200,14 +201,16 @@ inline static int stream_read_char(strea
// return 0; // EOF
}
-inline static unsigned int stream_read_word(stream_t *s){
+static inline unsigned int stream_read_word(stream_t *s)
+{
int x,y;
x=stream_read_char(s);
y=stream_read_char(s);
return (x<<8)|y;
}
-inline static unsigned int stream_read_dword(stream_t *s){
+static inline unsigned int stream_read_dword(stream_t *s)
+{
unsigned int y;
y=stream_read_char(s);
y=(y<<8)|stream_read_char(s);
@@ -218,14 +221,16 @@ inline static unsigned int stream_read_d
#define stream_read_fourcc stream_read_dword_le
-inline static unsigned int stream_read_word_le(stream_t *s){
+static inline unsigned int stream_read_word_le(stream_t *s)
+{
int x,y;
x=stream_read_char(s);
y=stream_read_char(s);
return (y<<8)|x;
}
-inline static unsigned int stream_read_dword_le(stream_t *s){
+static inline unsigned int stream_read_dword_le(stream_t *s)
+{
unsigned int y;
y=stream_read_char(s);
y|=stream_read_char(s)<<8;
@@ -234,7 +239,8 @@ inline static unsigned int stream_read_d
return y;
}
-inline static uint64_t stream_read_qword(stream_t *s){
+static inline uint64_t stream_read_qword(stream_t *s)
+{
uint64_t y;
y = stream_read_char(s);
y=(y<<8)|stream_read_char(s);
@@ -247,14 +253,16 @@ inline static uint64_t stream_read_qword
return y;
}
-inline static uint64_t stream_read_qword_le(stream_t *s){
+static inline uint64_t stream_read_qword_le(stream_t *s)
+{
uint64_t y;
y = stream_read_dword_le(s);
y|=(uint64_t)stream_read_dword_le(s)<<32;
return y;
}
-inline static unsigned int stream_read_int24(stream_t *s){
+static inline unsigned int stream_read_int24(stream_t *s)
+{
unsigned int y;
y = stream_read_char(s);
y=(y<<8)|stream_read_char(s);
@@ -262,7 +270,8 @@ inline static unsigned int stream_read_i
return y;
}
-inline static int stream_read(stream_t *s,char* mem,int total){
+static inline int stream_read(stream_t *s, char *mem, int total)
+{
int len=total;
while(len>0){
int x;
@@ -280,20 +289,24 @@ inline static int stream_read(stream_t *
}
uint8_t *stream_read_until(stream_t *s, uint8_t *mem, int max, uint8_t term, int utf16);
-inline static uint8_t *stream_read_line(stream_t *s, uint8_t *mem, int max, int utf16)
+static inline uint8_t *stream_read_line(stream_t *s, uint8_t *mem,
+ int max, int utf16)
{
return stream_read_until(s, mem, max, '\n', utf16);
}
-inline static int stream_eof(stream_t *s){
+static inline int stream_eof(stream_t *s)
+{
return s->eof;
}
-inline static off_t stream_tell(stream_t *s){
+static inline off_t stream_tell(stream_t *s)
+{
return s->pos+s->buf_pos-s->buf_len;
}
-inline static int stream_seek(stream_t *s,off_t pos){
+static inline int stream_seek(stream_t *s, off_t pos)
+{
mp_dbg(MSGT_DEMUX, MSGL_DBG3, "seek to 0x%"PRIX64"\n", pos);
@@ -314,7 +327,8 @@ inline static int stream_seek(stream_t *
return cache_stream_seek_long(s,pos);
}
-inline static int stream_skip(stream_t *s,off_t len){
+static inline int stream_skip(stream_t *s, off_t len)
+{
if( len<0 || (len>2*STREAM_BUFFER_SIZE && (s->flags & MP_STREAM_SEEK_FW)) ) {
// negative or big skip!
return stream_seek(s,stream_tell(s)+len);
Modified: trunk/sub/sub.c
==============================================================================
--- trunk/sub/sub.c Thu Jan 19 15:36:11 2012 (r34579)
+++ trunk/sub/sub.c Thu Jan 19 15:36:15 2012 (r34580)
@@ -165,7 +165,13 @@ static void alloc_buf(mp_osd_obj_t* obj)
}
// renders the buffer
-inline static void vo_draw_text_from_buffer(mp_osd_obj_t* obj,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)){
+static inline void vo_draw_text_from_buffer(mp_osd_obj_t* obj,
+ void (*draw_alpha)(int x0, int y0,
+ int w, int h,
+ unsigned char *src,
+ unsigned char *srca,
+ int stride))
+{
if (obj->allocated > 0) {
draw_alpha(obj->bbox.x1,obj->bbox.y1,
obj->bbox.x2-obj->bbox.x1,
@@ -190,7 +196,8 @@ no_utf8:
return c;
}
-inline static void vo_update_text_osd(mp_osd_obj_t* obj,int dxs,int dys){
+static inline void vo_update_text_osd(mp_osd_obj_t *obj, int dxs, int dys)
+{
const char *cp=vo_osd_text;
int x=20;
int h=0;
@@ -235,8 +242,11 @@ void osd_set_nav_box (uint16_t sx, uint1
nav_hl.ey = ey;
}
-inline static void vo_update_nav (mp_osd_obj_t *obj, int dxs, int dys, int left_border, int top_border,
- int right_border, int bottom_border, int orig_w, int orig_h) {
+static inline void vo_update_nav(mp_osd_obj_t *obj, int dxs, int dys,
+ int left_border, int top_border,
+ int right_border, int bottom_border,
+ int orig_w, int orig_h)
+{
int len;
int sx = nav_hl.sx, sy = nav_hl.sy;
int ex = nav_hl.ex, ey = nav_hl.ey;
@@ -298,7 +308,7 @@ static void tt_draw_alpha_buf(mp_osd_obj
bs+= srcskip;
}
}
-inline static void vo_update_text_teletext(mp_osd_obj_t *obj, int dxs, int dys)
+static inline void vo_update_text_teletext(mp_osd_obj_t *obj, int dxs, int dys)
{
int h=0,w=0,i,j,font,flashon;
int wm,hm;
@@ -527,7 +537,8 @@ int vo_osd_progbar_value=100; // 0..25
//
// the above schema is rescalled to n=elems bars
-inline static void vo_update_text_progbar(mp_osd_obj_t* obj,int dxs,int dys){
+static inline void vo_update_text_progbar(mp_osd_obj_t *obj, int dxs, int dys)
+{
obj->flags|=OSDFLAG_CHANGED|OSDFLAG_VISIBLE;
@@ -667,7 +678,8 @@ inline static void vo_update_text_progba
subtitle* vo_sub=NULL;
-inline static void vo_update_text_sub(mp_osd_obj_t* obj,int dxs,int dys){
+static inline void vo_update_text_sub(mp_osd_obj_t *obj, int dxs, int dys)
+{
unsigned char *t;
int c,i,j,l,x,y,font,prevc,counter;
int k;
@@ -1037,7 +1049,7 @@ inline static void vo_update_text_sub(mp
}
-inline static void vo_update_spudec_sub(mp_osd_obj_t* obj, int dxs, int dys)
+static inline void vo_update_spudec_sub(mp_osd_obj_t* obj, int dxs, int dys)
{
unsigned int bbox[4];
spudec_calc_bbox(vo_spudec, dxs, dys, bbox);
@@ -1048,7 +1060,12 @@ inline static void vo_update_spudec_sub(
obj->flags |= OSDFLAG_BBOX;
}
-inline static void vo_draw_spudec_sub(mp_osd_obj_t* obj, void (*draw_alpha)(int x0, int y0, int w, int h, unsigned char* src, unsigned char* srca, int stride))
+static inline void vo_draw_spudec_sub(mp_osd_obj_t *obj,
+ void (*draw_alpha)(int x0, int y0,
+ int w, int h,
+ unsigned char *src,
+ unsigned char *srca,
+ int stride))
{
spudec_draw_scaled(vo_spudec, obj->dxs, obj->dys, draw_alpha);
}
Modified: trunk/vidix/nvidia_vid.c
==============================================================================
--- trunk/vidix/nvidia_vid.c Thu Jan 19 15:36:11 2012 (r34579)
+++ trunk/vidix/nvidia_vid.c Thu Jan 19 15:36:15 2012 (r34580)
@@ -982,7 +982,7 @@ static int nv_get_caps(vidix_capability_
return 0;
}
-inline static int is_supported_fourcc(uint32_t fourcc)
+static inline int is_supported_fourcc(uint32_t fourcc)
{
if (fourcc == IMGFMT_UYVY || fourcc == IMGFMT_YUY2)
return 1;
More information about the MPlayer-cvslog
mailing list