mdbx: костыль для ложно-положительного предупреждения Coverity.

This commit is contained in:
Леонид Юрьев (Leonid Yuriev) 2023-10-14 11:10:32 +03:00
parent 04511a7a99
commit c254c728d2

View File

@ -26151,8 +26151,11 @@ static void histogram_acc(const size_t n, struct MDBX_chk_histogram *p) {
if (p->ranges[i].count) {
assert(i < last);
// раздвигаем
memmove(p->ranges + i + 1, p->ranges + i,
(last - i) * sizeof(p->ranges[0]));
#ifdef __COVERITY__
if (i < last) /* avoid Coverity false-positive issue */
#endif /* __COVERITY__ */
memmove(p->ranges + i + 1, p->ranges + i,
(last - i) * sizeof(p->ranges[0]));
}
p->ranges[i].begin = n;
p->ranges[i].end = n + 1;