From patchwork Tue Jan 24 09:39:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 92335 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1655534qgi; Tue, 24 Jan 2017 03:03:46 -0800 (PST) X-Received: by 10.200.55.112 with SMTP id p45mr29639999qtb.278.1485255826776; Tue, 24 Jan 2017 03:03:46 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id u34si12889737qta.88.2017.01.24.03.03.46 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 24 Jan 2017 03:03:46 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:47721 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVyt6-00033j-CV for patch@linaro.org; Tue, 24 Jan 2017 06:03:44 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50707) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVy7o-0002ig-7F for qemu-devel@nongnu.org; Tue, 24 Jan 2017 05:14:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cVy7l-0002am-Hy for qemu-devel@nongnu.org; Tue, 24 Jan 2017 05:14:52 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:58699) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVy7l-0002Zp-Aq; Tue, 24 Jan 2017 05:14:49 -0500 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 878A54210B; Tue, 24 Jan 2017 13:14:48 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with SMTP id 7B4DC58D; Tue, 24 Jan 2017 12:39:44 +0300 (MSK) Received: (nullmailer pid 12663 invoked by uid 1000); Tue, 24 Jan 2017 09:39:41 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Tue, 24 Jan 2017 12:39:31 +0300 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 86.62.121.231 Subject: [Qemu-devel] [PULL 27/31] scsi-disk: add 'fall through' comment to switch VERIFY cases X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Peter Maydell , Michael Tokarev Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell Commit 166dbda7e131 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 Signed-off-by: Michael Tokarev --- hw/scsi/scsi-disk.c | 1 + 1 file changed, 1 insertion(+) -- 2.1.4 diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index c080888..cc06fe5 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -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: