Cleanup: fix some clang tidy warnings

This commit is contained in:
Jacques Lucke 2020-08-07 19:19:38 +02:00
parent c50e5fcc34
commit e3f369e13f
2 changed files with 3 additions and 1 deletions

View File

@ -87,7 +87,7 @@ char *BLI_strdupcat(const char *__restrict str1, const char *__restrict str2)
str = MEM_mallocN(str1_len + str2_len, "strdupcat");
s = str;
memcpy(s, str1, str1_len);
memcpy(s, str1, str1_len); /* NOLINT: bugprone-not-null-terminated-result */
s += str1_len;
memcpy(s, str2, str2_len);

View File

@ -998,6 +998,7 @@ int load(istream &in, ViewMap *vm, ProgressBar *pb)
if (fe_s) {
bool b;
READ(b);
/* NOLINTNEXTLINE: bugprone-infinite-loop */
for (READ(fe_rle1), fe_rle2 = 0; fe_rle1 <= fe_s; fe_rle2 = fe_rle1, READ(fe_rle1)) {
if (b) {
for (unsigned int i = fe_rle2; i < fe_rle1; i++) {
@ -1023,6 +1024,7 @@ int load(istream &in, ViewMap *vm, ProgressBar *pb)
if (vv_s) {
Nature::VertexNature nature;
READ(nature);
/* NOLINTNEXTLINE: bugprone-infinite-loop */
for (READ(vv_rle1), vv_rle2 = 0; vv_rle1 <= vv_s; vv_rle2 = vv_rle1, READ(vv_rle1)) {
if (nature & Nature::T_VERTEX) {
for (unsigned int i = vv_rle2; i < vv_rle1; i++) {