1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 20:20:35 +00:00

Remove warnings in gcc

This commit is contained in:
Carles Fernandez 2017-05-13 10:41:35 +02:00
parent 44ba718de4
commit 8f9aba298f
2 changed files with 19 additions and 18 deletions

View File

@ -513,7 +513,7 @@ int decode_solgsi(char *buff, const solopt_t *opt, sol_t *sol)
/* decode solution position --------------------------------------------------*/
int decode_solpos(char *buff, const solopt_t *opt, sol_t *sol)
{
sol_t sol0 = {{0}};
sol_t sol0 = {{0,0}, {0,0,0,0,0,0}, {0,0,0,0,0,0}, {0,0,0,0,0,0}, '0', '0', '0', 0, 0, 0 };
char *p = buff;
trace(4,"decode_solpos: buff=%s\n",buff);
@ -678,7 +678,7 @@ void readsolopt(FILE *fp, solopt_t *opt)
int inputsol(unsigned char data, gtime_t ts, gtime_t te, double tint,
int qflag, const solopt_t *opt, solbuf_t *solbuf)
{
sol_t sol = {{0}};
sol_t sol = {{0,0}, {0,0,0,0,0,0}, {0,0,0,0,0,0}, {0,0,0,0,0,0}, '0', '0', '0', 0, 0, 0 };
int stat;
trace(4,"inputsol: data=0x%02x\n",data);
@ -811,7 +811,7 @@ int readsolt(char *files[], int nfile, gtime_t ts, gtime_t te,
int readsol(char *files[], int nfile, solbuf_t *sol)
{
gtime_t time = {0};
gtime_t time = {0, 0.0};
trace(3,"readsol: nfile=%d\n",nfile);
@ -889,7 +889,7 @@ sol_t *getsol(solbuf_t *solbuf, int index)
*-----------------------------------------------------------------------------*/
void initsolbuf(solbuf_t *solbuf, int cyclic, int nmax)
{
gtime_t time0 = {0};
gtime_t time0 = {0, 0.0};
trace(3,"initsolbuf: cyclic=%d nmax=%d\n",cyclic,nmax);
@ -969,7 +969,7 @@ int sort_solstat(solstatbuf_t *statbuf)
/* decode solution status ----------------------------------------------------*/
int decode_solstat(char *buff, solstat_t *stat)
{
static const solstat_t stat0 = {{0}};
static const solstat_t stat0 = {{0, 0.0}, '0', '0', 0, 0, 0, 0, '0', '0', 0, 0, 0, 0};
double tow,az,el,resp,resc;
int n,week,sat,frq,vsat,snr,fix,slip,lock,outc,slipc,rejc;
char id[32] = "",*p;
@ -1011,6 +1011,7 @@ int decode_solstat(char *buff, solstat_t *stat)
return 1;
}
/* add solution status data --------------------------------------------------*/
void addsolstat(solstatbuf_t *statbuf, const solstat_t *stat)
{
@ -1038,7 +1039,7 @@ void addsolstat(solstatbuf_t *statbuf, const solstat_t *stat)
int readsolstatdata(FILE *fp, gtime_t ts, gtime_t te, double tint,
solstatbuf_t *statbuf)
{
solstat_t stat = {{0}};
solstat_t stat = {{0, 0.0}, '0', '0', 0, 0, 0, 0, '0', '0', 0, 0, 0, 0};
char buff[MAXSOLMSG+1];
trace(3,"readsolstatdata:\n");
@ -1101,7 +1102,7 @@ int readsolstatt(char *files[], int nfile, gtime_t ts, gtime_t te,
int readsolstat(char *files[], int nfile, solstatbuf_t *statbuf)
{
gtime_t time = {0};
gtime_t time = {0, 0.0};
trace(3,"readsolstat: nfile=%d\n",nfile);
@ -1622,7 +1623,7 @@ int outsolheads(unsigned char *buff, const solopt_t *opt)
int outsols(unsigned char *buff, const sol_t *sol, const double *rb,
const solopt_t *opt)
{
gtime_t time,ts = {0};
gtime_t time,ts = {0, 0.0};
double gpst;
int week,timeu;
const char *sep = opt2sep(opt);
@ -1681,7 +1682,7 @@ int outsols(unsigned char *buff, const sol_t *sol, const double *rb,
int outsolexs(unsigned char *buff, const sol_t *sol, const ssat_t *ssat,
const solopt_t *opt)
{
gtime_t ts = {0};
gtime_t ts = {0, 0.0};
unsigned char *p = buff;
trace(3,"outsolexs:\n");

View File

@ -93,7 +93,7 @@ serial_t *openserial(const char *path, int mode, char *msg)
const speed_t bs[] = {
B300, B600, B1200, B2400, B4800, B9600, B19200, B38400, B57600, B115200, B230400
};
struct termios ios = {0};
struct termios ios;
int rw = 0;
tracet(3, "openserial: path=%s mode=%d\n", path, mode);
@ -292,7 +292,7 @@ void closefile_(file_t *file)
file_t *openfile(const char *path, int mode, char *msg)
{
file_t *file;
gtime_t time, time0 = {0};
gtime_t time, time0 = {0, 0.0};
double speed = 0.0, start = 0.0, swapintv = 0.0;
char *p;
int timetag = 0;
@ -398,7 +398,7 @@ int statefile(file_t *file)
/* read file -----------------------------------------------------------------*/
int readfile(file_t *file, unsigned char *buff, int nmax, char *msg)
{
struct timeval tv = {0};
struct timeval tv = { 0, 0 };
fd_set rs;
unsigned int t, tick;
int nr = 0;
@ -599,7 +599,7 @@ int errsock(void) {return errno;}
int setsock(socket_t sock, char *msg)
{
int bs = buffsize, mode = 1;
struct timeval tv = {0};
struct timeval tv = { 0, 0 };
tracet(3, "setsock: sock=%d\n", sock);
@ -629,7 +629,7 @@ int setsock(socket_t sock, char *msg)
/* non-block accept ----------------------------------------------------------*/
socket_t accept_nb(socket_t sock, struct sockaddr *addr, socklen_t *len)
{
struct timeval tv = {0};
struct timeval tv = { 0, 0 };
fd_set rs;
FD_ZERO(&rs); FD_SET(sock, &rs);
if (!select(sock+1, &rs, NULL, NULL, &tv)) return 0;
@ -640,7 +640,7 @@ socket_t accept_nb(socket_t sock, struct sockaddr *addr, socklen_t *len)
/* non-block connect ---------------------------------------------------------*/
int connect_nb(socket_t sock, struct sockaddr *addr, socklen_t len)
{
struct timeval tv = {0};
struct timeval tv = { 0, 0 };
fd_set rs, ws;
int err, flag;
@ -660,7 +660,7 @@ int connect_nb(socket_t sock, struct sockaddr *addr, socklen_t len)
/* non-block receive ---------------------------------------------------------*/
int recv_nb(socket_t sock, unsigned char *buff, int n)
{
struct timeval tv = {0};
struct timeval tv = { 0, 0 };
fd_set rs;
FD_ZERO(&rs); FD_SET(sock, &rs);
if (!select(sock+1, &rs, NULL, NULL, &tv)) return 0;
@ -671,7 +671,7 @@ int recv_nb(socket_t sock, unsigned char *buff, int n)
/* non-block send ------------------------------------------------------------*/
int send_nb(socket_t sock, unsigned char *buff, int n)
{
struct timeval tv = {0};
struct timeval tv = { 0, 0 };
fd_set ws;
FD_ZERO(&ws); FD_SET(sock, &ws);
if (!select(sock+1, NULL, &ws, NULL, &tv)) return 0;
@ -2101,7 +2101,7 @@ gtime_t strgettime(stream_t *stream)
*-----------------------------------------------------------------------------*/
void strsendnmea(stream_t *stream, const double *pos)
{
sol_t sol = {{0}};
sol_t sol = {{0,0}, {0,0,0,0,0,0}, {0,0,0,0,0,0}, {0,0,0,0,0,0}, '0', '0', '0', 0, 0, 0 };
unsigned char buff[1024];
int i, n;