Skip to content

Commit

Permalink
scsi-disk: add 'fall through' comment to switch VERIFY cases
Browse files Browse the repository at this point in the history
Commit 166dbda added some extra cases to a switch() such
that the existing code is intended to fall through the new
case statements. It's clear from the commit that this is
intentional, but less clear to subsequent readers of the
code, and not clear at all to static analysis tools like
Coverity. Add a /* fall through */ comment to indicate the
intent. (Fixes CID 1368287.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
  • Loading branch information
pm215 authored and Michael Tokarev committed Jan 24, 2017
1 parent 87eb2ba commit 4f04560
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions hw/scsi/scsi-disk.c
Expand Up @@ -2157,6 +2157,7 @@ static int32_t scsi_disk_dma_command(SCSIRequest *req, uint8_t *buf)
DPRINTF("Write %s(sector %" PRId64 ", count %u)\n",
(command & 0xe) == 0xe ? "And Verify " : "",
r->req.cmd.lba, len);
/* fall through */
case VERIFY_10:
case VERIFY_12:
case VERIFY_16:
Expand Down

0 comments on commit 4f04560

Please sign in to comment.