[PATCH 2/8] Replace INITARGS with void

Tomas Carnecky tom at dbservice.com
Mon Aug 23 15:06:20 PDT 2010


It was defined to void anyway. Everyone but panoramix used INITARGS, but
PanoramiXExtensionInit() had hardcoded argc/argv. Replace that with void
as well.

Signed-off-by: Tomas Carnecky <tom at dbservice.com>
---
 Xext/bigreq.c                        |    4 +-
 Xext/dpms.c                          |    2 +-
 Xext/panoramiX.c                     |    2 +-
 Xext/saver.c                         |    2 +-
 Xext/security.c                      |    2 +-
 Xext/shm.c                           |    2 +-
 Xext/xcmisc.c                        |    4 +-
 Xext/xres.c                          |    2 +-
 Xext/xselinux_ext.c                  |    2 +-
 Xext/xtest.c                         |    2 +-
 hw/xfree86/common/xf86Module.h       |    4 +--
 hw/xfree86/dixmods/dbemodule.c       |    2 +-
 hw/xfree86/dixmods/extmod/modinit.h  |   38 +++++++++-----------
 hw/xfree86/dixmods/extmod/xf86dga2.c |    4 +-
 hw/xfree86/dixmods/recordmod.c       |    2 +-
 hw/xfree86/dri/drimodule.c           |    2 +-
 mi/miinitext.c                       |   63 ++++++++++++++++-----------------
 17 files changed, 66 insertions(+), 73 deletions(-)

diff --git a/Xext/bigreq.c b/Xext/bigreq.c
index ce3734e..cb52787 100644
--- a/Xext/bigreq.c
+++ b/Xext/bigreq.c
@@ -42,10 +42,10 @@ from The Open Group.
 
 static DISPATCH_PROC(ProcBigReqDispatch);
 
-void BigReqExtensionInit(INITARGS);
+void BigReqExtensionInit(void);
 
 void
-BigReqExtensionInit(INITARGS)
+BigReqExtensionInit(void)
 {
     AddExtension(XBigReqExtensionName, 0, 0,
 		 ProcBigReqDispatch, ProcBigReqDispatch,
diff --git a/Xext/dpms.c b/Xext/dpms.c
index 33a6e26..32f33b3 100644
--- a/Xext/dpms.c
+++ b/Xext/dpms.c
@@ -371,7 +371,7 @@ SProcDPMSDispatch (ClientPtr client)
 }
 
 void
-DPMSExtensionInit(INITARGS)
+DPMSExtensionInit(void)
 {
     AddExtension(DPMSExtensionName, 0, 0,
 		 ProcDPMSDispatch, SProcDPMSDispatch,
diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c
index b73c53f..c7a8af3 100644
--- a/Xext/panoramiX.c
+++ b/Xext/panoramiX.c
@@ -432,7 +432,7 @@ void XineramaReinitData(ScreenPtr pScreen)
  *		Initialize global variables.
  */ 
 
-void PanoramiXExtensionInit(int argc, char *argv[])
+void PanoramiXExtensionInit(void)
 {
     int 	     	i;
     Bool	     	success = FALSE;
diff --git a/Xext/saver.c b/Xext/saver.c
index 6d91ddf..12d5d60 100644
--- a/Xext/saver.c
+++ b/Xext/saver.c
@@ -246,7 +246,7 @@ static DevPrivateKeyRec ScreenPrivateKeyRec;
  ****************/
 
 void
-ScreenSaverExtensionInit(INITARGS)
+ScreenSaverExtensionInit(void)
 {
     ExtensionEntry *extEntry;
     int		    i;
diff --git a/Xext/security.c b/Xext/security.c
index 7eb95de..ce49b91 100644
--- a/Xext/security.c
+++ b/Xext/security.c
@@ -1091,7 +1091,7 @@ SecurityResetProc(
  */
 
 void
-SecurityExtensionInit(INITARGS)
+SecurityExtensionInit(void)
 {
     ExtensionEntry	*extEntry;
     int ret = TRUE;
diff --git a/Xext/shm.c b/Xext/shm.c
index 3230d83..78344e0 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -255,7 +255,7 @@ ShmRegisterPrivates(void)
 }
 
 void
-ShmExtensionInit(INITARGS)
+ShmExtensionInit(void)
 {
     ExtensionEntry *extEntry;
     int i;
diff --git a/Xext/xcmisc.c b/Xext/xcmisc.c
index 986c870..e095d8f 100644
--- a/Xext/xcmisc.c
+++ b/Xext/xcmisc.c
@@ -55,10 +55,10 @@ static DISPATCH_PROC(SProcXCMiscGetVersion);
 static DISPATCH_PROC(SProcXCMiscGetXIDList);
 static DISPATCH_PROC(SProcXCMiscGetXIDRange);
 
-void XCMiscExtensionInit(INITARGS);
+void XCMiscExtensionInit(void);
 
 void
-XCMiscExtensionInit(INITARGS)
+XCMiscExtensionInit(void)
 {
     AddExtension(XCMiscExtensionName, 0, 0,
 		 ProcXCMiscDispatch, SProcXCMiscDispatch,
diff --git a/Xext/xres.c b/Xext/xres.c
index 06639a2..8d0ef30 100644
--- a/Xext/xres.c
+++ b/Xext/xres.c
@@ -375,7 +375,7 @@ SProcResDispatch (ClientPtr client)
 }
 
 void
-ResExtensionInit(INITARGS)
+ResExtensionInit(void)
 {
     (void) AddExtension(XRES_NAME, 0, 0,
                             ProcResDispatch, SProcResDispatch,
diff --git a/Xext/xselinux_ext.c b/Xext/xselinux_ext.c
index 93c1b59..28e13aa 100644
--- a/Xext/xselinux_ext.c
+++ b/Xext/xselinux_ext.c
@@ -702,7 +702,7 @@ SELinuxResetProc(ExtensionEntry *extEntry)
 }
 
 void
-SELinuxExtensionInit(INITARGS)
+SELinuxExtensionInit(void)
 {
     ExtensionEntry *extEntry;
 
diff --git a/Xext/xtest.c b/Xext/xtest.c
index 7268768..57e9626 100644
--- a/Xext/xtest.c
+++ b/Xext/xtest.c
@@ -96,7 +96,7 @@ static DISPATCH_PROC(SProcXTestGetVersion);
 static DISPATCH_PROC(SProcXTestGrabControl);
 
 void
-XTestExtensionInit(INITARGS)
+XTestExtensionInit(void)
 {
     AddExtension(XTestExtensionName, 0, 0,
             ProcXTestDispatch, SProcXTestDispatch,
diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h
index 51b9b16..30f6d44 100644
--- a/hw/xfree86/common/xf86Module.h
+++ b/hw/xfree86/common/xf86Module.h
@@ -169,9 +169,7 @@ typedef struct {
 #define GET_MODULE_MINOR_VERSION(vers)	(((vers) >> 16) & 0xFF)
 #define GET_MODULE_PATCHLEVEL(vers)	((vers) & 0xFFFF)
 
-#define INITARGS void
-
-typedef void (*InitExtension)(INITARGS);
+typedef void (*InitExtension)(void);
 
 typedef struct {
     InitExtension	initFunc;
diff --git a/hw/xfree86/dixmods/dbemodule.c b/hw/xfree86/dixmods/dbemodule.c
index 7363988..436a7b1 100644
--- a/hw/xfree86/dixmods/dbemodule.c
+++ b/hw/xfree86/dixmods/dbemodule.c
@@ -7,7 +7,7 @@
 
 static MODULESETUPPROTO(dbeSetup);
 
-extern void DbeExtensionInit(INITARGS);
+extern void DbeExtensionInit(void);
 
 static ExtensionModule dbeExt = {
     DbeExtensionInit,
diff --git a/hw/xfree86/dixmods/extmod/modinit.h b/hw/xfree86/dixmods/extmod/modinit.h
index 1154e46..05cd8ce 100644
--- a/hw/xfree86/dixmods/extmod/modinit.h
+++ b/hw/xfree86/dixmods/extmod/modinit.h
@@ -3,57 +3,53 @@
 #include <dix-config.h>
 #endif
 
-#ifndef INITARGS
-#define INITARGS void
-#endif
-
 #include <X11/extensions/shapeproto.h>
 
 #ifdef XTEST
-extern void XTestExtensionInit(INITARGS);
+extern void XTestExtensionInit(void);
 #include <X11/extensions/xtestproto.h>
 #endif
 
 #if 1
-extern void XTestExtension1Init(INITARGS);
+extern void XTestExtension1Init(void);
 #endif
 
 #ifdef SCREENSAVER
-extern void ScreenSaverExtensionInit (INITARGS);
+extern void ScreenSaverExtensionInit (void);
 #include <X11/extensions/saver.h>
 #endif
 
 #ifdef XF86VIDMODE
-extern void	XFree86VidModeExtensionInit(INITARGS);
+extern void	XFree86VidModeExtensionInit(void);
 #include <X11/extensions/xf86vmproto.h>
 #endif
 
 #ifdef XFreeXDGA
-extern void XFree86DGAExtensionInit(INITARGS);
-extern void XFree86DGARegister(INITARGS);
+extern void XFree86DGAExtensionInit(void);
+extern void XFree86DGARegister(void);
 #include <X11/extensions/xf86dgaproto.h>
 #endif
 
 #ifdef DPMSExtension
-extern void DPMSExtensionInit(INITARGS);
+extern void DPMSExtensionInit(void);
 #include <X11/extensions/dpmsconst.h>
 #endif
 
 #ifdef XV
-extern void XvExtensionInit(INITARGS);
-extern void XvMCExtensionInit(INITARGS);
-extern void XvRegister(INITARGS);
+extern void XvExtensionInit(void);
+extern void XvMCExtensionInit(void);
+extern void XvRegister(void);
 #include <X11/extensions/Xv.h>
 #include <X11/extensions/XvMC.h>
 #endif
 
 #ifdef RES
-extern void ResExtensionInit(INITARGS);
+extern void ResExtensionInit(void);
 #include <X11/extensions/XResproto.h>
 #endif
 
 #ifdef SHM
-extern void ShmExtensionInit(INITARGS);
+extern void ShmExtensionInit(void);
 #include <X11/extensions/shmproto.h>
 extern void ShmRegisterFuncs(
     ScreenPtr pScreen,
@@ -61,22 +57,22 @@ extern void ShmRegisterFuncs(
 #endif
 
 #ifdef XSELINUX
-extern void SELinuxExtensionInit(INITARGS);
+extern void SELinuxExtensionInit(void);
 #include "xselinux.h"
 #endif
 
 #ifdef XEVIE
-extern void XevieExtensionInit(INITARGS);
+extern void XevieExtensionInit(void);
 #endif
 
 #if 1
-extern void SecurityExtensionInit(INITARGS);
+extern void SecurityExtensionInit(void);
 #endif
 
 #if 1
-extern void PanoramiXExtensionInit(int argc, char *argv[]);
+extern void PanoramiXExtensionInit(void);
 #endif
 
 #if 1
-extern void XkbExtensionInit(INITARGS);
+extern void XkbExtensionInit(void);
 #endif
diff --git a/hw/xfree86/dixmods/extmod/xf86dga2.c b/hw/xfree86/dixmods/extmod/xf86dga2.c
index e522b5c..cd0ed57 100644
--- a/hw/xfree86/dixmods/extmod/xf86dga2.c
+++ b/hw/xfree86/dixmods/extmod/xf86dga2.c
@@ -86,7 +86,7 @@ typedef struct {
 
 
 void
-XFree86DGAExtensionInit(INITARGS)
+XFree86DGAExtensionInit(void)
 {
     ExtensionEntry* extEntry;
 
@@ -1059,7 +1059,7 @@ ProcXDGADispatch (ClientPtr client)
 }
 
 void
-XFree86DGARegister(INITARGS)
+XFree86DGARegister(void)
 {
   XDGAEventBase = &DGAEventBase;
 }
diff --git a/hw/xfree86/dixmods/recordmod.c b/hw/xfree86/dixmods/recordmod.c
index 63d340e..cb265de 100644
--- a/hw/xfree86/dixmods/recordmod.c
+++ b/hw/xfree86/dixmods/recordmod.c
@@ -8,7 +8,7 @@ extern Bool noTestExtensions;
 
 static MODULESETUPPROTO(recordSetup);
 
-extern void RecordExtensionInit(INITARGS);
+extern void RecordExtensionInit(void);
 
 static ExtensionModule recordExt = {
     RecordExtensionInit,
diff --git a/hw/xfree86/dri/drimodule.c b/hw/xfree86/dri/drimodule.c
index 28f6ad8..40e3aca 100644
--- a/hw/xfree86/dri/drimodule.c
+++ b/hw/xfree86/dri/drimodule.c
@@ -58,7 +58,7 @@ static XF86ModuleVersionInfo VersRec =
         {0,0,0,0}
 };
 
-extern void XFree86DRIExtensionInit(INITARGS);
+extern void XFree86DRIExtensionInit(void);
 #define _XF86DRI_SERVER_
 #include <X11/dri/xf86driproto.h>
 
diff --git a/mi/miinitext.c b/mi/miinitext.c
index 4499f37..3155bda 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -155,8 +155,7 @@ extern Bool noXvExtension;
 extern Bool noGEExtension;
 
 #ifndef XFree86LOADER
-#define INITARGS void
-typedef void (*InitExtension)(INITARGS);
+typedef void (*InitExtension)(void);
 #else /* XFree86Loader */
 #include "loaderProcs.h"
 #endif
@@ -187,82 +186,82 @@ typedef void (*InitExtension)(INITARGS);
 
 /* FIXME: this whole block of externs should be from the appropriate headers */
 #ifdef MITSHM
-extern void ShmExtensionInit(INITARGS);
+extern void ShmExtensionInit(void);
 #endif
 #ifdef PANORAMIX
-extern void PanoramiXExtensionInit(INITARGS);
+extern void PanoramiXExtensionInit(void);
 #endif
 #ifdef INXQUARTZ
-extern void PseudoramiXExtensionInit(INITARGS);
+extern void PseudoramiXExtensionInit(void);
 #endif
-extern void XInputExtensionInit(INITARGS);
+extern void XInputExtensionInit(void);
 #ifdef XTEST
-extern void XTestExtensionInit(INITARGS);
+extern void XTestExtensionInit(void);
 #endif
-extern void BigReqExtensionInit(INITARGS);
+extern void BigReqExtensionInit(void);
 #ifdef SCREENSAVER
-extern void ScreenSaverExtensionInit (INITARGS);
+extern void ScreenSaverExtensionInit (void);
 #endif
 #ifdef XV
-extern void XvExtensionInit(INITARGS);
-extern void XvMCExtensionInit(INITARGS);
+extern void XvExtensionInit(void);
+extern void XvMCExtensionInit(void);
 #endif
-extern void SyncExtensionInit(INITARGS);
-extern void XkbExtensionInit(INITARGS);
-extern void XCMiscExtensionInit(INITARGS);
+extern void SyncExtensionInit(void);
+extern void XkbExtensionInit(void);
+extern void XCMiscExtensionInit(void);
 #ifdef XRECORD
-extern void RecordExtensionInit(INITARGS);
+extern void RecordExtensionInit(void);
 #endif
 #ifdef DBE
-extern void DbeExtensionInit(INITARGS);
+extern void DbeExtensionInit(void);
 #endif
 #ifdef XCSECURITY
-extern void SecurityExtensionInit(INITARGS);
+extern void SecurityExtensionInit(void);
 #endif
 #ifdef XSELINUX
-extern void SELinuxExtensionInit(INITARGS);
+extern void SELinuxExtensionInit(void);
 #endif
 #ifdef XF86BIGFONT
-extern void XFree86BigfontExtensionInit(INITARGS);
+extern void XFree86BigfontExtensionInit(void);
 #endif
 #ifdef XF86VIDMODE
-extern void XFree86VidModeExtensionInit(INITARGS);
+extern void XFree86VidModeExtensionInit(void);
 #endif
 #ifdef XFreeXDGA
-extern void XFree86DGAExtensionInit(INITARGS);
+extern void XFree86DGAExtensionInit(void);
 #endif
 #ifdef GLXEXT
 typedef struct __GLXprovider __GLXprovider;
 extern __GLXprovider __glXDRISWRastProvider;
 extern void GlxPushProvider(__GLXprovider *impl);
-extern void GlxExtensionInit(INITARGS);
+extern void GlxExtensionInit(void);
 #endif
 #ifdef XF86DRI
-extern void XFree86DRIExtensionInit(INITARGS);
+extern void XFree86DRIExtensionInit(void);
 #endif
 #ifdef DPMSExtension
-extern void DPMSExtensionInit(INITARGS);
+extern void DPMSExtensionInit(void);
 #endif
-extern void RenderExtensionInit(INITARGS);
+extern void RenderExtensionInit(void);
 #ifdef RANDR
-extern void RRExtensionInit(INITARGS);
+extern void RRExtensionInit(void);
 #endif
 #ifdef RES
-extern void ResExtensionInit(INITARGS);
+extern void ResExtensionInit(void);
 #endif
 #ifdef DMXEXT
-extern void DMXExtensionInit(INITARGS);
+extern void DMXExtensionInit(void);
 #endif
 #ifdef XFIXES
-extern void XFixesExtensionInit(INITARGS);
+extern void XFixesExtensionInit(void);
 #endif
 #ifdef DAMAGE
-extern void DamageExtensionInit(INITARGS);
+extern void DamageExtensionInit(void);
 #endif
 #ifdef COMPOSITE
-extern void CompositeExtensionInit(INITARGS);
+extern void CompositeExtensionInit(void);
 #endif
-extern void GEExtensionInit(INITARGS);
+extern void GEExtensionInit(void);
 
 /* The following is only a small first step towards run-time
  * configurable extensions.
-- 
1.7.2.1.g43c6fa



More information about the xorg-devel mailing list