btrfs-progs: annotate fallthroughs in parse_size
authorEric Sandeen <sandeen@redhat.com>
Wed, 6 Nov 2013 23:15:54 +0000 (17:15 -0600)
committerChris Mason <chris.mason@fusionio.com>
Thu, 7 Nov 2013 21:10:41 +0000 (16:10 -0500)
We intentionally fall through these case statements;
just annotate it to be clear.

Resolves-Coverity-CID: 1054887
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
utils.c

diff --git a/utils.c b/utils.c
index 704b371..f499023 100644 (file)
--- a/utils.c
+++ b/utils.c
@@ -1522,16 +1522,22 @@ u64 parse_size(char *s)
                switch (c) {
                case 'e':
                        mult *= 1024;
+                       /* fallthrough */
                case 'p':
                        mult *= 1024;
+                       /* fallthrough */
                case 't':
                        mult *= 1024;
+                       /* fallthrough */
                case 'g':
                        mult *= 1024;
+                       /* fallthrough */
                case 'm':
                        mult *= 1024;
+                       /* fallthrough */
                case 'k':
                        mult *= 1024;
+                       /* fallthrough */
                case 'b':
                        break;
                default: