diff --git a/src/algorithms/libs/rtklib/rtklib_ionex.cc b/src/algorithms/libs/rtklib/rtklib_ionex.cc index 877044c9e..58e5653a0 100644 --- a/src/algorithms/libs/rtklib/rtklib_ionex.cc +++ b/src/algorithms/libs/rtklib/rtklib_ionex.cc @@ -165,7 +165,7 @@ void readionexdcb(FILE *fp, double *dcb, double *rms) 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 (!(sat = satid2no(id))) diff --git a/src/algorithms/libs/rtklib/rtklib_preceph.cc b/src/algorithms/libs/rtklib/rtklib_preceph.cc index 6ab4d8af8..9cbb88509 100644 --- a/src/algorithms/libs/rtklib/rtklib_preceph.cc +++ b/src/algorithms/libs/rtklib/rtklib_preceph.cc @@ -123,7 +123,7 @@ int readsp3h(FILE *fp, gtime_t *time, char *type, int *sats, } 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) { trace(3, "Error reading sp3 header\n"); diff --git a/src/algorithms/libs/rtklib/rtklib_rtkcmn.cc b/src/algorithms/libs/rtklib/rtklib_rtkcmn.cc index 8f4b68023..53c67fa88 100644 --- a/src/algorithms/libs/rtklib/rtklib_rtkcmn.cc +++ b/src/algorithms/libs/rtklib/rtklib_rtkcmn.cc @@ -2847,7 +2847,7 @@ int readantex(const char *file, pcvs_t *pcvs) { strncpy(pcv.type, buff, 20); // MAXANT (64) 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 (!strncmp(pcv.code + 3, " ", 8)) diff --git a/src/algorithms/libs/rtklib/rtklib_stream.cc b/src/algorithms/libs/rtklib/rtklib_stream.cc index 3c0e56aad..e9a29cf3f 100644 --- a/src/algorithms/libs/rtklib/rtklib_stream.cc +++ b/src/algorithms/libs/rtklib/rtklib_stream.cc @@ -795,7 +795,7 @@ void decodetcppath(const char *path, char *addr, char *port, char *user, } 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) { tracet(1, "error reading address"); @@ -1080,7 +1080,7 @@ void updatetcpsvr(tcpsvr_t *tcpsvr, char *msg) { continue; } - std::snprintf(saddr, 256, "%s", tcpsvr->cli[i].saddr); + std::snprintf(saddr, sizeof(saddr), "%s", tcpsvr->cli[i].saddr); n++; } if (n == 0) @@ -1970,7 +1970,7 @@ void *ftpthread(void *arg) } 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); ftp->state = 2; return nullptr; @@ -2051,7 +2051,7 @@ void *ftpthread(void *arg) 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) { tracet(3, "Error reading ftp local\n");