Pārlūkot izejas kodu

Added return in Version::Get::State::Match to quiet warning.

Added unreached return at the end of Version::Get::State::Match
to stop this _incorrect_ warning:

    version_set.cc:376:5: warning: control reaches end of
    non-void function [-Wreturn-type]

This warning was being emitted when building with clang 6.0.1-10
and also emitted by lgtm.com when statically analyzing leveldb even
though all SaverState enumeration values were handled.

PiperOrigin-RevId: 272455474
ld
Chris Mumford pirms 5 gadiem
revīziju iesūtīja Chris Mumford
vecāks
revīzija
657ba51429
1 mainītis faili ar 4 papildinājumiem un 0 dzēšanām
  1. +4
    -0
      db/version_set.cc

+ 4
- 0
db/version_set.cc Parādīt failu

@ -373,6 +373,10 @@ Status Version::Get(const ReadOptions& options, const LookupKey& k,
state->found = true;
return false;
}
// Not reached. Added to avoid false compilation warnings of
// "control reaches end of non-void function".
return false;
}
};

Notiek ielāde…
Atcelt
Saglabāt