Skip to content

Commit

Permalink
Eliminate (intended) switch fall-through to reduce compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
spakin committed May 12, 2021
1 parent 27b31c8 commit d8b8324
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/byfl/pagetable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,16 +145,17 @@ void WordPageTableEntry::increment(size_t pos1, size_t pos2)
for (size_t pos = pos1; pos <= pos2; pos++)
switch (byte_counter[pos]) {
case bf_max_bytecount:
/* Maxed out our counter -- don't increment it further. */
// Maxed out our counter -- don't increment it further.
break;

case 0:
/* First time a byte was touched */
// First time a byte was touched
bytes_touched++;
/* No break */
byte_counter[pos]++;
break;

default:
/* Common case -- increment the counter. */
// Common case -- increment the counter.
byte_counter[pos]++;
break;
}
Expand Down

0 comments on commit d8b8324

Please sign in to comment.