mdbx: fix false-positive SH4 GCC warning (backport).

This commit is contained in:
Леонид Юрьев (Leonid Yuriev) 2023-02-13 16:00:03 +03:00
parent 60736dbabb
commit f532e907e9

View File

@ -1768,7 +1768,7 @@ __cold static int uniq_check(const mdbx_mmap_t *pending, MDBX_env **found) {
? uniq_peek(pending, &scan->me_lck_mmap)
: uniq_poke(pending, &scan->me_lck_mmap, &salt);
if (err == MDBX_ENODATA) {
uint64_t length;
uint64_t length = 0;
if (likely(mdbx_filesize(pending->fd, &length) == MDBX_SUCCESS &&
length == 0)) {
/* LY: skip checking since LCK-file is empty, i.e. just created. */