CI: Fix cpplint job

This commit is contained in:
Carles Fernandez 2023-03-21 11:06:09 +01:00
parent 8e1818f743
commit 318c7cba9f
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
4 changed files with 7 additions and 7 deletions

View File

@ -165,7 +165,7 @@ void readionexdcb(FILE *fp, double *dcb, double *rms)
if (strstr(label, "PRN / BIAS / RMS") == label) if (strstr(label, "PRN / BIAS / RMS") == label)
{ {
int ret = std::snprintf(id, 3, "%s", buff + 3); int ret = std::snprintf(id, 3, "%s", buff + 3); // NOLINT(runtime/printf)
if (ret >= 0 && ret < 3) if (ret >= 0 && ret < 3)
{ {
if (!(sat = satid2no(id))) if (!(sat = satid2no(id)))

View File

@ -123,7 +123,7 @@ int readsp3h(FILE *fp, gtime_t *time, char *type, int *sats,
} }
else if (i == 12) else if (i == 12)
{ {
int ret = std::snprintf(tsys, 3, "%s", buff + 9); int ret = std::snprintf(tsys, 3, "%s", buff + 9); // NOLINT(runtime/printf)
if (ret < 0 || ret > 3) if (ret < 0 || ret > 3)
{ {
trace(3, "Error reading sp3 header\n"); trace(3, "Error reading sp3 header\n");

View File

@ -2847,7 +2847,7 @@ int readantex(const char *file, pcvs_t *pcvs)
{ {
strncpy(pcv.type, buff, 20); // MAXANT (64) strncpy(pcv.type, buff, 20); // MAXANT (64)
pcv.type[20] = '\0'; pcv.type[20] = '\0';
int ret = std::snprintf(pcv.code, 20, "%s", buff + 20); // MAXANT (64) int ret = std::snprintf(pcv.code, 20, "%s", buff + 20); // NOLINT(runtime/printf)
if (ret >= 0 && ret < 20) if (ret >= 0 && ret < 20)
{ {
if (!strncmp(pcv.code + 3, " ", 8)) if (!strncmp(pcv.code + 3, " ", 8))

View File

@ -795,7 +795,7 @@ void decodetcppath(const char *path, char *addr, char *port, char *user,
} }
if (addr) if (addr)
{ {
int ret = std::snprintf(addr, 256, "%s", p); int ret = std::snprintf(addr, 256, "%s", p); // NOLINT(runtime/printf)
if (ret < 0 || ret >= 256) if (ret < 0 || ret >= 256)
{ {
tracet(1, "error reading address"); tracet(1, "error reading address");
@ -1080,7 +1080,7 @@ void updatetcpsvr(tcpsvr_t *tcpsvr, char *msg)
{ {
continue; continue;
} }
std::snprintf(saddr, 256, "%s", tcpsvr->cli[i].saddr); std::snprintf(saddr, sizeof(saddr), "%s", tcpsvr->cli[i].saddr);
n++; n++;
} }
if (n == 0) if (n == 0)
@ -1970,7 +1970,7 @@ void *ftpthread(void *arg)
} }
if (fs::exists(tmpfile)) if (fs::exists(tmpfile))
{ {
std::snprintf(ftp->local, 1024, "%s", tmpfile.c_str()); std::snprintf(ftp->local, 1024, "%s", tmpfile.c_str()); // NOLINT(runtime/printf)
tracet(3, "ftpthread: file exists %s\n", ftp->local); tracet(3, "ftpthread: file exists %s\n", ftp->local);
ftp->state = 2; ftp->state = 2;
return nullptr; return nullptr;
@ -2051,7 +2051,7 @@ void *ftpthread(void *arg)
break; break;
} }
} }
int ret2 = std::snprintf(ftp->local, 1024, "%s", local.c_str()); int ret2 = std::snprintf(ftp->local, 1024, "%s", local.c_str()); // NOLINT(runtime/printf)
if (ret2 < 0 || ret2 >= 1024) if (ret2 < 0 || ret2 >= 1024)
{ {
tracet(3, "Error reading ftp local\n"); tracet(3, "Error reading ftp local\n");