mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-30 23:03:05 +00:00 
			
		
		
		
	Fix more warnings
This commit is contained in:
		| @@ -78,12 +78,6 @@ | ||||
| #define rtk_lock(f)         pthread_mutex_lock(f) | ||||
| #define rtk_unlock(f)       pthread_mutex_unlock(f) | ||||
|  | ||||
| #define TINTACT             200         /* period for stream active (ms) */ | ||||
| #define SERIBUFFSIZE        4096        /* serial buffer size (bytes) */ | ||||
| #define TIMETAGH_LEN        64          /* time tag file header length */ | ||||
| #define MAXCLI              32          /* max client connection for tcp svr */ | ||||
| #define MAXSTATMSG          32          /* max length of status message */ | ||||
|  | ||||
| #define VER_RTKLIB  "2.4.2" | ||||
| #define NTRIP_AGENT         "RTKLIB/" VER_RTKLIB | ||||
| #define NTRIP_CLI_PORT      2101        /* default ntrip-client connection port */ | ||||
| @@ -98,12 +92,18 @@ | ||||
| #define NTRIP_RSP_ERROR     "ERROR"     /* ntrip response: error */ | ||||
|  | ||||
| #define FTP_CMD             "wget"      /* ftp/http command */ | ||||
| #define FTP_TIMEOUT         30          /* ftp/http timeout (s) */ | ||||
|  | ||||
| #define MAXRAWLEN   4096                /* max length of receiver raw message */ | ||||
| #define MAXSOLBUF   256                 /* max number of solution buffer */ | ||||
| #define MAXSBSMSG   32                  /* max number of SBAS msg in RTK server */ | ||||
| #define MAXOBSBUF   128                 /* max number of observation data buffer */ | ||||
| const int  TINTACT = 200;             //!<  period for stream active (ms) | ||||
| const int  SERIBUFFSIZE = 4096;       //!<  serial buffer size (bytes) | ||||
| const int  TIMETAGH_LEN = 64;         //!<  time tag file header length | ||||
| const int  MAXCLI = 32;               //!<  max client connection for tcp svr | ||||
| const int  MAXSTATMSG = 32;           //!<  max length of status message | ||||
|  | ||||
| const int FTP_TIMEOUT = 30;           //!< ftp/http timeout (s) | ||||
| const int MAXRAWLEN = 4096;           //!< max length of receiver raw message | ||||
| const int MAXSOLBUF = 256;            //!< max number of solution buffer | ||||
| const int MAXSBSMSG = 32;             //!< max number of SBAS msg in RTK server | ||||
| const int MAXOBSBUF = 128;            //!< max number of observation data buffer | ||||
|  | ||||
| const int FILEPATHSEP = '/'; | ||||
| const double RE_WGS84 = 6378137.0;             //!< earth semimajor axis (WGS84) (m) | ||||
| @@ -113,6 +113,7 @@ const double HION = 350000.0;                  //!<  ionosphere height (m) | ||||
| const double PRN_HWBIAS = 1e-6;                //!<  process noise of h/w bias (m/MHz/sqrt(s)) | ||||
|  | ||||
| const double INT_SWAP_STAT = 86400.0;          //!<  swap interval of solution status file (s) | ||||
| const double INT_SWAP_TRAC = 86400.0;          //!<  swap interval of trace file (s) | ||||
|  | ||||
| const unsigned int POLYCRC32 = 0xEDB88320u;    //!<  CRC32 polynomial | ||||
| const unsigned int POLYCRC24Q = 0x1864CFBu;    //!<  CRC24Q polynomial | ||||
|   | ||||
| @@ -2951,60 +2951,69 @@ void freenav(nav_t *nav, int opt) | ||||
| /* debug trace functions -----------------------------------------------------*/ | ||||
| //#ifdef TRACE | ||||
| // | ||||
| //static FILE *fp_trace=NULL;     /* file pointer of trace */ | ||||
| //static char file_trace[1024];   /* trace file */ | ||||
| //static int level_trace=0;       /* level of trace */ | ||||
| //static unsigned int tick_trace=0; /* tick time at traceopen (ms) */ | ||||
| //static gtime_t time_trace={0};  /* time at traceopen */ | ||||
| //static pthread_mutex_t lock_trace;       /* lock for trace */ | ||||
| // | ||||
| //static void traceswap(void) | ||||
| //{ | ||||
| //    gtime_t time=utc2gpst(timeget()); | ||||
| //    char path[1024]; | ||||
| // | ||||
| //    lock(&lock_trace); | ||||
| // | ||||
| //    if ((int)(time2gpst(time      ,NULL)/INT_SWAP_TRAC)== | ||||
| //        (int)(time2gpst(time_trace,NULL)/INT_SWAP_TRAC)) { | ||||
| //        unlock(&lock_trace); | ||||
| //        return; | ||||
| //    } | ||||
| //    time_trace=time; | ||||
| // | ||||
| //    if (!reppath(file_trace,path,time,"","")) { | ||||
| //        unlock(&lock_trace); | ||||
| //        return; | ||||
| //    } | ||||
| //    if (fp_trace) fclose(fp_trace); | ||||
| // | ||||
| //    if (!(fp_trace=fopen(path,"w"))) { | ||||
| //        fp_trace=stderr; | ||||
| //    } | ||||
| //    unlock(&lock_trace); | ||||
| //} | ||||
| //extern void traceopen(const char *file) | ||||
| //{ | ||||
| //    gtime_t time=utc2gpst(timeget()); | ||||
| //    char path[1024]; | ||||
| // | ||||
| //    reppath(file,path,time,"",""); | ||||
| //    if (!*path||!(fp_trace=fopen(path,"w"))) fp_trace=stderr; | ||||
| //    strcpy(file_trace,file); | ||||
| //    tick_trace=tickget(); | ||||
| //    time_trace=time; | ||||
| //    initlock(&lock_trace); | ||||
| //} | ||||
| //extern void traceclose(void) | ||||
| //{ | ||||
| //    if (fp_trace&&fp_trace!=stderr) fclose(fp_trace); | ||||
| //    fp_trace=NULL; | ||||
| //    file_trace[0]='\0'; | ||||
| //} | ||||
| //extern void tracelevel(int level) | ||||
| //{ | ||||
| //    level_trace=level; | ||||
| //} | ||||
| FILE *fp_trace = NULL;     /* file pointer of trace */ | ||||
| char file_trace[1024];   /* trace file */ | ||||
| static int level_trace = 0;       /* level of trace */ | ||||
| unsigned int tick_trace = 0; /* tick time at traceopen (ms) */ | ||||
| gtime_t time_trace = {0, 0.0};  /* time at traceopen */ | ||||
| pthread_mutex_t lock_trace;       /* lock for trace */ | ||||
|  | ||||
| void traceswap(void) | ||||
| { | ||||
|     gtime_t time = utc2gpst(timeget()); | ||||
|     char path[1024]; | ||||
|  | ||||
|     rtk_lock(&lock_trace); | ||||
|  | ||||
|     if ((int)(time2gpst(time, NULL) / INT_SWAP_TRAC) == | ||||
|             (int)(time2gpst(time_trace, NULL) / INT_SWAP_TRAC)) | ||||
|         { | ||||
|             rtk_unlock(&lock_trace); | ||||
|             return; | ||||
|         } | ||||
|     time_trace = time; | ||||
|  | ||||
|     if (!reppath(file_trace, path, time, "", "")) | ||||
|         { | ||||
|             rtk_unlock(&lock_trace); | ||||
|             return; | ||||
|         } | ||||
|     if (fp_trace) fclose(fp_trace); | ||||
|  | ||||
|     if (!(fp_trace = fopen(path, "w"))) | ||||
|         { | ||||
|             fp_trace = stderr; | ||||
|         } | ||||
|     rtk_unlock(&lock_trace); | ||||
| } | ||||
|  | ||||
|  | ||||
| void traceopen(const char *file) | ||||
| { | ||||
|     gtime_t time = utc2gpst(timeget()); | ||||
|     char path[1024]; | ||||
|  | ||||
|     reppath(file, path, time, "", ""); | ||||
|     if (!*path || !(fp_trace = fopen(path, "w"))) fp_trace = stderr; | ||||
|     strcpy(file_trace, file); | ||||
|     tick_trace = tickget(); | ||||
|     time_trace = time; | ||||
|     initlock(&lock_trace); | ||||
| } | ||||
|  | ||||
|  | ||||
| void traceclose(void) | ||||
| { | ||||
|     if (fp_trace && fp_trace != stderr) fclose(fp_trace); | ||||
|     fp_trace = NULL; | ||||
|     file_trace[0] = '\0'; | ||||
| } | ||||
|  | ||||
|  | ||||
| void tracelevel(int level) | ||||
| { | ||||
|     level_trace = level; | ||||
| } | ||||
| //extern void trace(int level, const char *format, ...) | ||||
| //{ | ||||
| //    va_list ap; | ||||
| @@ -3020,15 +3029,14 @@ void freenav(nav_t *nav, int opt) | ||||
| //    fflush(fp_trace); | ||||
| //} | ||||
|  | ||||
| void tracet(int level  __attribute__((unused)), const char *format  __attribute__((unused)), ...) | ||||
| void tracet(int level, const char *format, ...) | ||||
| { | ||||
| //    va_list ap; | ||||
| // | ||||
| //    if (!fp_trace||level>level_trace) return; | ||||
| //    traceswap(); | ||||
| //    fprintf(fp_trace,"%d %9.3f: ",level,(tickget()-tick_trace)/1000.0); | ||||
| //    va_start(ap,format); vfprintf(fp_trace,format,ap); va_end(ap); | ||||
| //    fflush(fp_trace); | ||||
|     va_list ap; | ||||
|     if (!fp_trace || level > level_trace) return; | ||||
|     traceswap(); | ||||
|     fprintf(fp_trace, "%d %9.3f: ", level, (tickget() - tick_trace)  /1000.0); | ||||
|     va_start(ap, format); vfprintf(fp_trace, format, ap); va_end(ap); | ||||
|     fflush(fp_trace); | ||||
| } | ||||
|  | ||||
| void tracemat(int level __attribute__((unused)), const double *A __attribute__((unused)), | ||||
|   | ||||
| @@ -213,9 +213,10 @@ int savenav(const char *file, const nav_t *nav); | ||||
| void freeobs(obs_t *obs); | ||||
| void freenav(nav_t *nav, int opt); | ||||
|  | ||||
| //void traceopen(const char *file); | ||||
| //void traceclose(void); | ||||
| //void tracelevel(int level); | ||||
| void traceopen(const char *file); | ||||
| void traceclose(void); | ||||
| void tracelevel(int level); | ||||
| void traceswap(void); | ||||
| void trace   (int level, const char *format, ...); | ||||
| void tracet  (int level, const char *format, ...); | ||||
| void tracemat(int level, const double *A, int n, int m, int p, int q); | ||||
|   | ||||
| @@ -759,7 +759,7 @@ void discontcp(tcp_t *tcp, int tcon) | ||||
| /* open tcp server -----------------------------------------------------------*/ | ||||
| tcpsvr_t *opentcpsvr(const char *path, char *msg) | ||||
| { | ||||
|     tcpsvr_t *tcpsvr, tcpsvr0 = {{0}}; | ||||
|     tcpsvr_t *tcpsvr, tcpsvr0; // = {{0}}; | ||||
|     char port[256] = ""; | ||||
|  | ||||
|     tracet(3, "opentcpsvr: path=%s\n", path); | ||||
| @@ -983,7 +983,7 @@ int consock(tcpcli_t *tcpcli, char *msg) | ||||
| /* open tcp client -----------------------------------------------------------*/ | ||||
| tcpcli_t *opentcpcli(const char *path, char *msg) | ||||
| { | ||||
|     tcpcli_t *tcpcli, tcpcli0 = {{0}}; | ||||
|     tcpcli_t *tcpcli, tcpcli0; // = {{0}}; | ||||
|     char port[256] = ""; | ||||
|  | ||||
|     tracet(3, "opentcpcli: path=%s\n", path); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Carles Fernandez
					Carles Fernandez