diff options
author | rathann <rathann@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-02-09 14:08:03 +0000 |
---|---|---|
committer | rathann <rathann@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-02-09 14:08:03 +0000 |
commit | e7db4ccf1afbb6653ae1aae44b1c96c724361985 (patch) | |
tree | 9cc7321a75460de67bd0dae4e940b73439a1374b /vidix/drivers/sis_vid.c | |
parent | 1f34ddefd2546a37c6efe4fcd9ea3f7627af4a5d (diff) | |
download | mpv-e7db4ccf1afbb6653ae1aae44b1c96c724361985.tar.bz2 mpv-e7db4ccf1afbb6653ae1aae44b1c96c724361985.tar.xz |
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
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17567 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'vidix/drivers/sis_vid.c')
-rw-r--r-- | vidix/drivers/sis_vid.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/vidix/drivers/sis_vid.c b/vidix/drivers/sis_vid.c index 2562ed7148..535a299581 100644 --- a/vidix/drivers/sis_vid.c +++ b/vidix/drivers/sis_vid.c @@ -167,17 +167,17 @@ static unsigned short sis_card_ids[] = { /** 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 @@ static void setsrregmask(uint8_t reg, uint8_t data, uint8_t mask) } /* 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 @@ int vixQueryFourcc(vidix_fourcc_t * to) return ENOSYS; } -static int bridge_in_slave_mode() +static int bridge_in_slave_mode(void) { unsigned char usScratchP1_00; @@ -465,7 +465,7 @@ static int bridge_in_slave_mode() /* 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_dispmode() } } -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 set_disptype_regs() } } -static void init_overlay() +static void init_overlay(void) { /* Initialize first overlay (CRT1) */ @@ -1154,7 +1154,7 @@ static void set_overlay(SISOverlayPtr pOverlay, int index) /* 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 @@ static void set_format(SISOverlayPtr pOverlay) setvideoregmask(Index_VI_Control_Misc0, fmt, 0x7c); } -static void set_colorkey() +static void set_colorkey(void) { uint8_t r, g, b; |