Mercurial > mplayer.hg
diff vidix/drivers/sis_vid.c @ 17566:f580a7755ac5
Patch by Stefan Huehner / stefan % huehner ! org \
patch replaces '()' for the correct '(void)' in function
declarations/prototypes which have no parameters. The '()' syntax tell
thats there is a variable list of arguments, so that the compiler cannot
check this. The extra CFLAG '-Wstrict-declarations' shows those cases.
Comments about a similar patch applied to ffmpeg:
That in C++ these mean the same, but in ANSI C the semantics are
different; function() is an (obsolete) K&R C style forward declaration,
it basically means that the function can have any number and any types
of parameters, effectively completely preventing the compiler from doing
any sort of type checking. -- Erik Slagter
Defining functions with unspecified arguments is allowed but bad.
With arguments unspecified the compiler can't report an error/warning
if the function is called with incorrect arguments. -- M\ns Rullg\rd
author | rathann |
---|---|
date | Thu, 09 Feb 2006 14:08:03 +0000 |
parents | 401b440a6d76 |
children | 8f9d757af58e |
line wrap: on
line diff
--- a/vidix/drivers/sis_vid.c Thu Feb 09 10:23:51 2006 +0000 +++ b/vidix/drivers/sis_vid.c Thu Feb 09 14:08:03 2006 +0000 @@ -167,17 +167,17 @@ /** function declarations **/ -extern void sis_init_video_bridge(); +extern void sis_init_video_bridge(void); static void set_overlay(SISOverlayPtr pOverlay, int index); -static void close_overlay(); +static void close_overlay(void); static void calc_scale_factor(SISOverlayPtr pOverlay, int index, int iscrt2); static void set_line_buf_size(SISOverlayPtr pOverlay); static void merge_line_buf(int enable); static void set_format(SISOverlayPtr pOverlay); -static void set_colorkey(); +static void set_colorkey(void); static void set_brightness(uint8_t brightness); static void set_contrast(uint8_t contrast); @@ -219,13 +219,13 @@ } /* vblank checking*/ -static uint8_t vblank_active_CRT1() +static uint8_t vblank_active_CRT1(void) { /* this may be too simplistic? */ return (inSISREG(SISINPSTAT) & 0x08); } -static uint8_t vblank_active_CRT2() +static uint8_t vblank_active_CRT2(void) { uint8_t ret; if (sis_vga_engine == SIS_315_VGA) { @@ -445,7 +445,7 @@ return ENOSYS; } -static int bridge_in_slave_mode() +static int bridge_in_slave_mode(void) { unsigned char usScratchP1_00; @@ -465,7 +465,7 @@ /* This does not handle X dual head mode, since 1) vidix doesn't support it and 2) it doesn't make sense for other gfx drivers */ -static void set_dispmode() +static void set_dispmode(void) { sis_bridge_is_slave = 0; @@ -489,7 +489,7 @@ } } -static void set_disptype_regs() +static void set_disptype_regs(void) { switch (sis_displaymode) { case DISPMODE_SINGLE1: /* TW: CRT1 only */ @@ -527,7 +527,7 @@ } } -static void init_overlay() +static void init_overlay(void) { /* Initialize first overlay (CRT1) */ @@ -1154,7 +1154,7 @@ /* TW: Overlay MUST NOT be switched off while beam is over it */ -static void close_overlay() +static void close_overlay(void) { uint32_t watchdog; @@ -1493,7 +1493,7 @@ setvideoregmask(Index_VI_Control_Misc0, fmt, 0x7c); } -static void set_colorkey() +static void set_colorkey(void) { uint8_t r, g, b;