1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-10-31 23:26:22 +00:00

Fix warnings

This commit is contained in:
Carles Fernandez 2023-12-01 11:53:54 +01:00
parent 4f36210536
commit 1a4e5f43af
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -3730,12 +3730,12 @@ int savenav(const char *file, const nav_t *nav)
} }
auto id = satno2id(nav->eph[i].sat); auto id = satno2id(nav->eph[i].sat);
fprintf(fp, fprintf(fp,
"%s,%d,%d,%d,%d,%lld,%lld,%lld,%.14E,%.14E,%.14E,%.14E,%.14E,%.14E," "%s,%d,%d,%d,%d,%ld,%ld,%ld,%.14E,%.14E,%.14E,%.14E,%.14E,%.14E,"
"%.14E,%.14E,%.14E,%.14E,%.14E,%.14E,%.14E,%.14E,%.14E,%.14E," "%.14E,%.14E,%.14E,%.14E,%.14E,%.14E,%.14E,%.14E,%.14E,%.14E,"
"%.14E,%.14E,%.14E,%.14E,%.14E,%d,%d\n", "%.14E,%.14E,%.14E,%.14E,%.14E,%d,%d\n",
id.data(), nav->eph[i].iode, nav->eph[i].iodc, nav->eph[i].sva, id.data(), nav->eph[i].iode, nav->eph[i].iodc, nav->eph[i].sva,
nav->eph[i].svh, static_cast<int64_t>(nav->eph[i].toe.time), nav->eph[i].svh, static_cast<intmax_t>(nav->eph[i].toe.time),
static_cast<int64_t>(nav->eph[i].toc.time), static_cast<int64_t>(nav->eph[i].ttr.time), static_cast<intmax_t>(nav->eph[i].toc.time), static_cast<intmax_t>(nav->eph[i].ttr.time),
nav->eph[i].A, nav->eph[i].e, nav->eph[i].i0, nav->eph[i].OMG0, nav->eph[i].A, nav->eph[i].e, nav->eph[i].i0, nav->eph[i].OMG0,
nav->eph[i].omg, nav->eph[i].M0, nav->eph[i].deln, nav->eph[i].OMGd, nav->eph[i].omg, nav->eph[i].M0, nav->eph[i].deln, nav->eph[i].OMGd,
nav->eph[i].idot, nav->eph[i].crc, nav->eph[i].crs, nav->eph[i].cuc, nav->eph[i].idot, nav->eph[i].crc, nav->eph[i].crs, nav->eph[i].cuc,
@ -3751,11 +3751,11 @@ int savenav(const char *file, const nav_t *nav)
} }
auto id = satno2id(nav->geph[i].sat); auto id = satno2id(nav->geph[i].sat);
fprintf(fp, fprintf(fp,
"%s,%d,%d,%d,%d,%d,%lld,%lld,%.14E,%.14E,%.14E,%.14E,%.14E,%.14E," "%s,%d,%d,%d,%d,%d,%ld,%ld,%.14E,%.14E,%.14E,%.14E,%.14E,%.14E,"
"%.14E,%.14E,%.14E,%.14E,%.14E,%.14E\n", "%.14E,%.14E,%.14E,%.14E,%.14E,%.14E\n",
id.data(), nav->geph[i].iode, nav->geph[i].frq, nav->geph[i].svh, id.data(), nav->geph[i].iode, nav->geph[i].frq, nav->geph[i].svh,
nav->geph[i].sva, nav->geph[i].age, static_cast<int64_t>(nav->geph[i].toe.time), nav->geph[i].sva, nav->geph[i].age, static_cast<intmax_t>(nav->geph[i].toe.time),
static_cast<int64_t>(nav->geph[i].tof.time), static_cast<intmax_t>(nav->geph[i].tof.time),
nav->geph[i].pos[0], nav->geph[i].pos[1], nav->geph[i].pos[2], nav->geph[i].pos[0], nav->geph[i].pos[1], nav->geph[i].pos[2],
nav->geph[i].vel[0], nav->geph[i].vel[1], nav->geph[i].vel[2], nav->geph[i].vel[0], nav->geph[i].vel[1], nav->geph[i].vel[2],
nav->geph[i].acc[0], nav->geph[i].acc[1], nav->geph[i].acc[2], nav->geph[i].acc[0], nav->geph[i].acc[1], nav->geph[i].acc[2],
@ -5016,7 +5016,8 @@ int rtk_uncompress(const char *file, char *uncfile)
int stat = 0; int stat = 0;
char *p; char *p;
char cmd[2048] = ""; char cmd[2048] = "";
char tmpfile[1025] = ""; char tmpfile[1024] = "";
tmpfile[1023] = '\0';
char buff[1024]; char buff[1024];
char *fname; char *fname;
char *dir = const_cast<char *>(""); char *dir = const_cast<char *>("");
@ -5067,6 +5068,7 @@ int rtk_uncompress(const char *file, char *uncfile)
std::strncpy(uncfile, tmpfile, 1024); std::strncpy(uncfile, tmpfile, 1024);
uncfile[p - tmpfile] = '\0'; uncfile[p - tmpfile] = '\0';
std::strncpy(buff, tmpfile, 1024); std::strncpy(buff, tmpfile, 1024);
buff[1023] = '\0';
fname = buff; fname = buff;
if ((p = strrchr(buff, '/'))) if ((p = strrchr(buff, '/')))
{ {
@ -5157,7 +5159,8 @@ int expath(const char *path, char *paths[], int nmax)
int i; int i;
int j; int j;
int n = 0; int n = 0;
char tmp[1025] = ""; char tmp[1024] = "";
tmp[1023] = '\0';
struct dirent *d; struct dirent *d;
DIR *dp; DIR *dp;
const char *file = path; const char *file = path;
@ -5222,7 +5225,6 @@ int expath(const char *path, char *paths[], int nmax)
if (strlen(paths[i]) < 1025) if (strlen(paths[i]) < 1025)
{ {
std::strncpy(tmp, paths[i], 1024); std::strncpy(tmp, paths[i], 1024);
tmp[1023] = '\0';
} }
else else
{ {