1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-19 05:33:02 +00:00

Fix Wstringop-truncation warning

This commit is contained in:
Carles Fernandez 2022-12-17 14:03:28 +01:00
parent 840b184beb
commit 4a4d2d134e
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -3103,7 +3103,7 @@ void readpos(const char *file, const char *rcv, double *pos)
continue; continue;
} }
auto sta = stas[np++]; // NOLINT(readability-qualified-auto) auto sta = stas[np++]; // NOLINT(readability-qualified-auto)
std::strncpy(sta, str, 16); strncpy_no_trunc(sta, 16, str, 256);
sta[15] = '\0'; sta[15] = '\0';
} }
fclose(fp); fclose(fp);