[MPlayer-cvslog] CVS: main/vidix/drivers cyberblade_vid.c, 1.9, 1.10 mach64_vid.c, 1.37, 1.38 radeon_vid.c, 1.95, 1.96 savage_vid.c, 1.5, 1.6 sis_bridge.c, 1.3, 1.4 sis_vid.c, 1.4, 1.5

Dominik Mierzejewski CVS syncmail at mplayerhq.hu
Thu Feb 9 15:08:06 CET 2006


CVS change done by Dominik Mierzejewski CVS

Update of /cvsroot/mplayer/main/vidix/drivers
In directory mail:/var2/tmp/cvs-serv31671/vidix/drivers

Modified Files:
	cyberblade_vid.c mach64_vid.c radeon_vid.c savage_vid.c 
	sis_bridge.c sis_vid.c 
Log Message:
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



Index: cyberblade_vid.c
===================================================================
RCS file: /cvsroot/mplayer/main/vidix/drivers/cyberblade_vid.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- cyberblade_vid.c	13 Jan 2006 00:23:32 -0000	1.9
+++ cyberblade_vid.c	9 Feb 2006 14:08:03 -0000	1.10
@@ -94,7 +94,7 @@
 	SROUTB(reg+1,(val>>8)&255);
 }
 
-void DumpRegisters()
+void DumpRegisters(void)
 {
         int reg,val;
 #ifdef DEBUG_LOGFILE

Index: mach64_vid.c
===================================================================
RCS file: /cvsroot/mplayer/main/vidix/drivers/mach64_vid.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- mach64_vid.c	20 Oct 2005 18:03:43 -0000	1.37
+++ mach64_vid.c	9 Feb 2006 14:08:03 -0000	1.38
@@ -304,7 +304,7 @@
     return ret;
 }
 
-static void mach64_vid_make_default()
+static void mach64_vid_make_default(void)
 {
   mach64_fifo_wait(5);
   OUTREG(SCALER_COLOUR_CNTL,0x00101000);

Index: radeon_vid.c
===================================================================
RCS file: /cvsroot/mplayer/main/vidix/drivers/radeon_vid.c,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -r1.95 -r1.96
--- radeon_vid.c	8 Jan 2006 22:18:02 -0000	1.95
+++ radeon_vid.c	9 Feb 2006 14:08:03 -0000	1.96
@@ -950,7 +950,7 @@
 };
 
 #ifdef HAVE_X11
-void probe_fireGL_driver() {
+void probe_fireGL_driver(void) {
   Display *dp = XOpenDisplay ((void*)0);
   int n = 0;
   char **extlist;

Index: savage_vid.c
===================================================================
RCS file: /cvsroot/mplayer/main/vidix/drivers/savage_vid.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- savage_vid.c	13 Jan 2006 00:23:32 -0000	1.5
+++ savage_vid.c	9 Feb 2006 14:08:03 -0000	1.6
@@ -82,7 +82,7 @@
 /* CR69[0] = 1 : Mem-mapped regs */
 #define USE_MM_FOR_PRI_STREAM_OLD   0x01
 
-void SavageStreamsOn();
+void SavageStreamsOn(void);
 
 /*
  * There are two different streams engines used in the Savage line.
@@ -323,7 +323,7 @@
 	{ PCI_CHIP_PROSAVAGE_DDRK	, 			S3_PROSAVAGE },
 };
 
-void SavageSetColorOld()
+void SavageSetColorOld(void)
 {
 
 
@@ -360,7 +360,7 @@
   }
 }
 
-void SavageSetColorKeyOld()
+void SavageSetColorKeyOld(void)
 {
     int red, green, blue;
 
@@ -421,8 +421,8 @@
 
 
 static void
-SavageDisplayVideoOld(
-){
+SavageDisplayVideoOld(void)
+{
     int vgaCRIndex, vgaCRReg, vgaIOBase;
     unsigned int ssControl;
     int cr92;
@@ -528,7 +528,7 @@
 
 }
 
-void SavageInitStreamsOld()
+void SavageInitStreamsOld(void)
 {
     /*unsigned long jDelta;*/
     unsigned long format = 0;
@@ -582,7 +582,7 @@
 }
 
 void 
-SavageStreamsOn()
+SavageStreamsOn(void)
 {
      unsigned char jStreamsControl;
      unsigned short vgaCRIndex = 0x3d0 + 4;
@@ -726,7 +726,7 @@
 }
 
 
-void SavageStreamsOff()
+void SavageStreamsOff(void)
 {
     unsigned char jStreamsControl;
     unsigned short vgaCRIndex = 0x3d0 + 4;

Index: sis_bridge.c
===================================================================
RCS file: /cvsroot/mplayer/main/vidix/drivers/sis_bridge.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- sis_bridge.c	13 Jan 2006 00:23:32 -0000	1.3
+++ sis_bridge.c	9 Feb 2006 14:08:03 -0000	1.4
@@ -60,7 +60,7 @@
 
 
 /* sense connected devices on 30x bridge */
-static void sis_sense_30x()
+static void sis_sense_30x(void)
 {
     unsigned char backupP4_0d, backupP2_00, biosflag;
     unsigned char testsvhs_tempbl, testsvhs_tempbh;
@@ -356,7 +356,7 @@
 }
 
 
-static void sis_detect_crt1()
+static void sis_detect_crt1(void)
 {
     unsigned char CR32;
     unsigned char CRT1Detected = 0;
@@ -394,7 +394,7 @@
 }
 
 
-static void sis_detect_lcd()
+static void sis_detect_lcd(void)
 {
     unsigned char CR32, CR36, CR37;
 
@@ -413,7 +413,7 @@
 }
 
 
-static void sis_detect_tv()
+static void sis_detect_tv(void)
 {
     unsigned char SR16, SR38, CR32, CR38 = 0, CR79;
     int temp = 0;
@@ -517,7 +517,7 @@
 }
 
 
-static void sis_detect_crt2()
+static void sis_detect_crt2(void)
 {
     unsigned char CR32;
 
@@ -563,7 +563,7 @@
 
 
 /* Preinit: detect video bridge and sense connected devs */
-static void sis_detect_video_bridge()
+static void sis_detect_video_bridge(void)
 {
     int temp, temp1, temp2;
 
@@ -708,7 +708,7 @@
 
 
 /* detect video bridge type and sense connected devices */
-void sis_init_video_bridge()
+void sis_init_video_bridge(void)
 {
 
     sis_detect_video_bridge();

Index: sis_vid.c
===================================================================
RCS file: /cvsroot/mplayer/main/vidix/drivers/sis_vid.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- sis_vid.c	13 Jan 2006 00:23:32 -0000	1.4
+++ sis_vid.c	9 Feb 2006 14:08:03 -0000	1.5
@@ -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;
 




More information about the MPlayer-cvslog mailing list