File c2rfx241_warnings.patch of Package rnxcmp

--- c2rfx241.c	2007-02-01 09:45:59.000000000 +0100
+++ c2rfx241.new.c	2007-02-01 10:04:14.000000000 +0100
@@ -98,7 +98,7 @@
 FILE *ifp;
 
 clock_format clk1,clk0;
-data_format y1[MAXSAT][MAXTYPE],y0[MAXSAT][MAXTYPE];
+data_format y1_[MAXSAT][MAXTYPE],y0_[MAXSAT][MAXTYPE];
 char flag1[MAXSAT][MAXTYPE2],flag[MAXSAT][MAXTYPE2];
 
 int nsat,ntype,clk_order = 0, clk_arc_order = 0;
@@ -121,7 +121,7 @@
 void error_exit(int error_no, char *string);
 
 /*---------------------------------------------------------------------*/
-main(int argc, char *argv[]){
+int main(int argc, char *argv[]){
 /********************************************************************/
 /*  sattbl : previous column on which the satellites are set        */
 /*           new satellites are set to -1                           */
@@ -131,7 +131,7 @@
     static int nsat1 = 0, n;
 
     char dline[MAXLEN],*p;
-    int event,sattbl[MAXSAT],i,j;
+    int sattbl[MAXSAT],i,j;
 
     if ( DBL_EPSILON > 1.e-15 ) error_exit(17,line);
 
@@ -188,7 +188,7 @@
         strncpy(sat_lst_old,&line[32],nsat*3);
         for(i=0;i<nsat;i++){
             strncpy(flag1[i],flag[i],ntype*2);
-            for(j=0;j<ntype;j++) y0[i][j] = y1[i][j];
+            for(j=0;j<ntype;j++) y0_[i][j] = y1_[i][j];
         }
     }
     return EXIT_SUCCESS;
@@ -270,9 +270,9 @@
     freopen(infile,"r",stdin);
 }
 /*---------------------------------------------------------------------*/
-void header(){
+void header(void){
     int end = 1;
-    char line[MAXLEN],*p,crx_ver;
+    char line[MAXLEN],*p;
     nl_count++;
     if( fgets(line,MAXLEN,stdin) == NULL ) error_exit(5,CRX_VERSION);
     if( strncmp(&line[0],CRX_VERSION,3) != 0 ||
@@ -298,7 +298,7 @@
     /****  process clock offset  ****/
     /********************************/
     int i,j;
-    char *p,*ps;
+    char *p;
 
     read_chk_line(dline);
     p = dline;
@@ -410,7 +410,7 @@
 
     for(i=0,i0=sattbl ; i<nsat ; i++,i0++){
 
-        getdiff(y1[i],y0[*i0],*i0,dflag);     /****  read data  ****/
+        getdiff(y1_[i],y0_[*i0],*i0,dflag);     /****  read data  ****/
 
         /*********************************/
         /****  repair the data frags  ****/
@@ -425,9 +425,9 @@
         /****************************************/
         /****  recover the date, and output  ****/
         /****************************************/
-        for(j=0,py1=y1[i] ; j<ntype ; j++,py1++){
+        for(j=0,py1=y1_[i] ; j<ntype ; j++,py1++){
             if(py1->arc_order >= 0){
-                py0 = &(y0[*i0][j]);
+                py0 = &(y0_[*i0][j]);
                 if(py1->order < py1->arc_order){
                     (py1->order)++;
                     for(k=0,k1=1; k<py1->order; k++,k1++){
@@ -469,8 +469,8 @@
 }
 /*---------------------------------------------------------------------*/
 void getdiff(data_format *y, data_format *y0, int i0, char *dflag){
-    int j,lmax;
-    char *s,*s1,*s2,line[MAXLEN];
+    int j;
+    char *s,*s1,line[MAXLEN];
 
     /******************************************/
     /****  separate the fields with "\0"   ****/
@@ -568,7 +568,7 @@
         else
             buff[1]=' ';
     }
-    p_buff += SPRINTF(p_buff,"%4s%08.8ld\n",buff,labs(yf));
+    p_buff += SPRINTF(p_buff,"%4s%08ld\n",buff,labs(yf));
 }
 /*---------------------------------------------------------------------*/
 void read_clock(char *p ,int *yi, long *yf){
@@ -647,12 +647,12 @@
         exit(EXIT_FAILURE);
     }
     if(error_no == 6 ){
-        fprintf(stderr,"ERROR at line %ld : exceed maximum number of satellites(%d)\n",MAXSAT,nl_count);
+        fprintf(stderr,"ERROR at line %ld : exceed maximum number of satellites(%d)\n",nl_count,MAXSAT);
         fprintf(stderr,"      start>%s<end\n",string);
         exit(EXIT_FAILURE);
     }
     if(error_no == 7 ){
-        fprintf(stderr,"ERROR at line %ld : exceed maximum order of difference (%d)\n",MAX_DIFF_ORDER,nl_count);
+        fprintf(stderr,"ERROR at line %ld : exceed maximum order of difference (%d)\n",nl_count,MAX_DIFF_ORDER);
         fprintf(stderr,"      start>%s<end\n",string);
         exit(EXIT_FAILURE);
     }
openSUSE Build Service is sponsored by