* [PATCH] mkfs.xfs: annotate fallthrough cases in cvtnum
@ 2016-05-12 2:47 Eric Sandeen
2016-05-12 11:50 ` Christoph Hellwig
2016-05-12 13:59 ` Carlos Maiolino
0 siblings, 2 replies; 3+ messages in thread
From: Eric Sandeen @ 2016-05-12 2:47 UTC (permalink / raw)
To: xfs-oss
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@redhat.com>
---
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:
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mkfs.xfs: annotate fallthrough cases in cvtnum
2016-05-12 2:47 [PATCH] mkfs.xfs: annotate fallthrough cases in cvtnum Eric Sandeen
@ 2016-05-12 11:50 ` Christoph Hellwig
2016-05-12 13:59 ` Carlos Maiolino
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2016-05-12 11:50 UTC (permalink / raw)
To: Eric Sandeen; +Cc: xfs-oss
Looks fine,
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mkfs.xfs: annotate fallthrough cases in cvtnum
2016-05-12 2:47 [PATCH] mkfs.xfs: annotate fallthrough cases in cvtnum Eric Sandeen
2016-05-12 11:50 ` Christoph Hellwig
@ 2016-05-12 13:59 ` Carlos Maiolino
1 sibling, 0 replies; 3+ messages in thread
From: Carlos Maiolino @ 2016-05-12 13:59 UTC (permalink / raw)
To: xfs
On Wed, May 11, 2016 at 09:47:45PM -0500, Eric Sandeen wrote:
> We should really collapse our 3 cvtnum variants,
> but for now at least shut up Coverity about this
> intentional case fallthrough.
>
Looks good
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
> Addresses-Coverity-ID: 1361553
> Addresses-Coverity-ID: 1361554
> Addresses-Coverity-ID: 1361555
> Addresses-Coverity-ID: 1361556
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
>
> 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:
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
--
Carlos
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-05-12 13:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-12 2:47 [PATCH] mkfs.xfs: annotate fallthrough cases in cvtnum Eric Sandeen
2016-05-12 11:50 ` Christoph Hellwig
2016-05-12 13:59 ` Carlos Maiolino
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox