[Kst] kdeextragear-2/kst/plugins/crosscorrelation

Andrew Walker arwalker at sumusltd.com
Mon Dec 15 20:08:34 CET 2003


CVS commit by arwalker: 

Remove compiler warnings and compile under strict C syntax


  M +12 -3     crosscorrelation.c   1.4


--- kdeextragear-2/kst/plugins/crosscorrelation/crosscorrelation.c  #1.3:1.4
@@ -13,4 +13,7 @@
 #define TWO_PI  6.2831853071795858696103
 
+void four1( double data[], unsigned long nn, int isign );
+void realft( double data[], unsigned long n, int isign );
+void twofft( double* pData[], double* pResult[], int iLength );
 int crosscorrelation( const double *const inArrays[], const int inArrayLens[],
                 const double inScalars[],
@@ -163,6 +166,4 @@ void realft( double data[], unsigned lon
 void twofft( double* pData[], double* pResult[], int iLength )
 {
-    unsigned long       i;
-    unsigned long       j;
     unsigned long       ulNum;
     double              dRep;
@@ -170,4 +171,6 @@ void twofft( double* pData[], double* pR
     double              dAim;
     double              dAip;
+    int         i;
+    int         j;
     
     ulNum = iLength + iLength;
@@ -218,4 +221,10 @@ int crosscorrelation( const double *cons
     int i;
 
+    /*
+    // prevent warnings about unused parameters...
+    */
+    if( inScalars ) { }
+    if( outScalars ) { }
+    
     if( inArrayLens[0] == inArrayLens[1] )
     {
@@ -223,5 +232,5 @@ int crosscorrelation( const double *cons
         
         /*
-         determine the number of points required...
+        // determine the number of points required...
         */
         while( iNumPoints < iLength && iNumPoints > 0 )





More information about the Kst mailing list