xfs
[Top] [All Lists]

[PATCH] mkfs.xfs: annotate fallthrough cases in cvtnum

To: xfs-oss <xfs@xxxxxxxxxxx>
Subject: [PATCH] mkfs.xfs: annotate fallthrough cases in cvtnum
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Wed, 11 May 2016 21:47:45 -0500
Delivered-to: xfs@xxxxxxxxxxx
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.0
We should really collapse our 3 cvtnum variants,
but for now at least shut up Coverity about this
intentional case fallthrough.

Addresses-Coverity-ID: 1361553
Addresses-Coverity-ID: 1361554
Addresses-Coverity-ID: 1361555
Addresses-Coverity-ID: 1361556
Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---

diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
index 955dcfd..12fe8f3 100644
--- a/mkfs/xfs_mkfs.c
+++ b/mkfs/xfs_mkfs.c
@@ -3623,14 +3623,19 @@ cvtnum(
        switch (c) {
        case 'e':
                i *= 1024LL;
+               /* fall through */
        case 'p':
                i *= 1024LL;
+               /* fall through */
        case 't':
                i *= 1024LL;
+               /* fall through */
        case 'g':
                i *= 1024LL;
+               /* fall through */
        case 'm':
                i *= 1024LL;
+               /* fall through */
        case 'k':
                return i * 1024LL;
        default:

<Prev in Thread] Current Thread [Next in Thread>