Skip to content

Commit

Permalink
Replace assert with if to prevent warning about unused variable.
Browse files Browse the repository at this point in the history
GitOrigin-RevId: f9e72c623ace83f14b2268647a0880bcb49040a4
  • Loading branch information
levlam committed Jan 21, 2018
1 parent 86cb681 commit 5c0633f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion memprof/memprof.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,10 @@ std::int32_t get_ht_pos(const Backtrace &bt, bool force = false) {
pos++;
if (pos == static_cast<std::int32_t>(ht.size())) {
pos = 0;
assert(!was_overflow);
if (was_overflow) {
// unreachable
std::abort();
}
was_overflow = true;
}
}
Expand Down

0 comments on commit 5c0633f

Please sign in to comment.