[nas] [patch] remove some unused variables

Stefan Huehner stefan at huehner.org
Sun Aug 20 04:47:40 MDT 2006


Hi,

attached patch removes some unused variables.

Please recheck and consider applying.

Regards,
Stefan

-------------- next part --------------
diff -u clients/audio/aupanel/aupanel.c clients/audio/aupanel/aupanel.c
--- clients/audio/aupanel/aupanel.c	(working copy)
+++ clients/audio/aupanel/aupanel.c	(working copy)
@@ -296,7 +296,6 @@
 menuCB(Widget w, XtPointer gp, XtPointer call_data)
 {
     GlobalDataPtr   g = (GlobalDataPtr) gp;
-    int             i;
     String          string;
 
     XtVaGetValues(w, XtNlabel, &string, NULL);
diff -u clients/audio/examples/plyBcktAsync.c clients/audio/examples/plyBcktAsync.c
--- clients/audio/examples/plyBcktAsync.c	(working copy)
+++ clients/audio/examples/plyBcktAsync.c	(working copy)
@@ -39,7 +39,6 @@
 {
     AuServer       *aud;
     AuBucketID      bucket;
-    AuDeviceID      device = AuNone;
     AuBool          done = AuFalse;
     char           *file = argv[1];
 
--- server/os/access.c	(revision 180)
+++ server/os/access.c	(working copy)
@@ -254,7 +254,6 @@
 #if !defined(TCPCONN) && !defined(UNIXCONN)
     return -1;
 #else
-    register int n;
     int len;
     caddr_t addr;
     int family;
@@ -619,8 +618,6 @@
 pointer pAddr;
 {
     int len;
-    register HOST *host;
-    int unixFamily;
 
     if (!AuthorizedClient(client))
         return (AuBadAccess);
--- server/dda/voxware/auvoxware.c	(revision 180)
+++ server/dda/voxware/auvoxware.c	(working copy)
@@ -496,23 +496,14 @@
                        AuUint32 * auServerMinRate,
                        AuUint32 * auServerMaxRate)
 {
-    AuDeviceID stereo, mono;
     ComponentPtr d, *p;
-    int i;
     AuUint8 formatIn, formatOut;
     AuUint32 bytesPerSampleIn, bytesPerSampleOut;
     static AuBool initialized = AuFalse;
     extern RESTYPE auComponentType;
     extern ComponentPtr *auServerDevices,       /* array of devices */
-       *auServerBuckets,        /* array of server owned buckets */
-       *auServerRadios,         /* array of server owned radios */
-        auDevices,              /* list of all devices */
-        auBuckets,              /* list of all buckets */
-        auRadios;               /* list of all radios */
-    extern AuUint32 auNumServerDevices, /* number of devices */
-        auNumActions,           /* number of defined actions */
-        auNumServerBuckets,     /* number of server owned buckets */
-        auNumServerRadios;      /* number of server owned radios */
+        auDevices;              /* list of all devices */
+    extern AuUint32 auNumServerDevices; /* number of devices */
 
 
     if (NasConfig.DoDebug) {
@@ -728,7 +719,6 @@
 static AuUint32
 setSampleRate(AuUint32 rate)
 {
-    int numSamplesIn, numSamplesOut;
     AuBlock l;
 
     setTimer(0);                /* JET - turn off the timer here so the
@@ -1267,7 +1257,6 @@
 static void
 enableProcessFlow(void)
 {
-    AuUint8 *p;
 
     if (NasConfig.DoDebug) {
         osLogMsg("enableProcessFlow();\n");
@@ -1600,7 +1589,6 @@
 static void
 setupSoundcard(SndStat * sndStatPtr)
 {
-    int samplesize;
 
     if (NasConfig.DoDebug) {
         osLogMsg("setupSoundcard(...);\n");
@@ -1701,7 +1689,6 @@
 initMixer(void)
 {
     unsigned int extramode = 0;
-    AuInt32 i;
 
 #if defined(__CYGWIN__)         /* we want the file to be created if necc under
                                    windows */
@@ -1798,12 +1785,10 @@
 {
     static AuBool AL_initialized = AuFalse;
     static AuUint8 *physicalBuffers;
-    int fd;
     AuUint32 physicalBuffersSize;
     extern AuUint8 *auPhysicalOutputBuffers;
     extern AuUint32 auPhysicalOutputBuffersSize;
     extern void AuProcessData();
-    char *nas_device_policy;
     unsigned int extramode = 0; /* for extra open modes (cygwin) */
 #if defined(AUDIO_GETINFO)
     audio_info_t spkrinf;
@@ -1853,7 +1838,6 @@
      */
     if (!AL_initialized) {
         int fd;
-        AuInt32 i;
 
         AL_initialized = AuTrue;
 
--- server/dia/audispatch.c	(revision 180)
+++ server/dia/audispatch.c	(working copy)
@@ -1554,15 +1554,11 @@
 AuSendInitResponse(ClientPtr client)
 {
     extern ComponentPtr *auServerDevices,       /* array of devices */
-       *auServerBuckets,        /* array of server owned
+       *auServerBuckets;        /* array of server owned
                                  * buckets */
-       *auServerRadios;         /* array of server owned
-                                 * radios */
     extern AuUint32 auNumServerDevices, /* number of devices */
-        auNumServerBuckets,     /* number of server owned
+        auNumServerBuckets;     /* number of server owned
                                  * buckets */
-        auNumServerRadios;      /* number of server owned
-                                 * radios */
     extern unsigned char auFormats[],
             auElementTypes[], auWaveForms[], auActions[];
     int i;


More information about the Nas mailing list