io: core: mark expected switch fall-through
PATCH 1/1 io: core: mark expected switch fall-through
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
Addresses-Coverity-ID: 1397962
--- drivers/iio/industrialio-core.c | 1 + 1 file changed, 1 insertion(+)
drivers/iio/industrialio-core.c +1 -0
@@ -588,6 +588,7 @@ static ssize_t __iio_format_value(char *buf, size_t len, unsigned int type,return snprintf (buf, len,"%d" , vals[0 ]);case IIO_VAL_INT_PLUS_MICRO_DB : scale_db = true; +/* fall through */ case IIO_VAL_INT_PLUS_MICRO :if (vals[1 ] <0 ) return snprintf(buf, len, "-%d.%06u%s", abs(vals[0]),
Signature · 1 line
2.7.4
Quoted 3 lines
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
please fix the subject line, should be
iio: core: Mark...
thx, p.
Quoted 19 lines
Addresses-Coverity-ID: 1397962
Signed-off-by Gustavo A. R. Silva <[email protected]>--- drivers/iio/industrialio-core.c | 1 + 1 file changed, 1 insertion(+)drivers/iio/industrialio-core.c +1
-0@@ -588,6 +588,7 @@ static ssize_t __iio_format_value(char *buf, size_t len, unsigned int type,return snprintf (buf, len,"%d" , vals[0 ]);case IIO_VAL_INT_PLUS_MICRO_DB : scale_db = true; +/* fall through */ case IIO_VAL_INT_PLUS_MICRO :if (vals[1 ] <0 ) return snprintf(buf, len, "-%d.%06u%s", abs(vals[0]),
Signature · 2 lines
Peter Meerwald-Stadler Mobile: +43 664 24 44 418
Quoting Peter Meerwald-Stadler <[email protected]>:
Quoted 6 lines
Quoted 2 lines
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
please fix the subject line, should be
iio: core: Mark...
Oh yeah. I'll send v2 shortly.
Thanks!
--
Gustavo A. R. Silva
PATCH v2 1/1 iio: core: Mark expected switch fall-through
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
Addresses-Coverity-ID: 1397962
---
Changes in v2:
Fix subject line.
drivers/iio/industrialio-core.c | 1 + 1 file changed, 1 insertion(+)
drivers/iio/industrialio-core.c +1 -0
@@ -588,6 +588,7 @@ static ssize_t __iio_format_value(char *buf, size_t len, unsigned int type,return snprintf (buf, len,"%d" , vals[0 ]);case IIO_VAL_INT_PLUS_MICRO_DB : scale_db = true; +/* fall through */ case IIO_VAL_INT_PLUS_MICRO :if (vals[1 ] <0 ) return snprintf(buf, len, "-%d.%06u%s", abs(vals[0]),
Signature · 1 line
2.7.4
Re: [PATCH v2] iio: core: Mark expected switch fall-through
Quoted 5 lines · On Wed, 8 Nov 2017 12:08:26 -0600 "Gustavo A. R. Silva"…
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
Addresses-Coverity-ID: 1397962
Signed-off-by Gustavo A. R. Silva <[email protected]>
Applied to the togreg branch of iio.git and will be pushed out as testing.
Thanks,
Jonathan
Quoted 19 lines
---
Changes in v2:
Fix subject line.drivers/iio/industrialio-core.c | 1 + 1 file changed, 1 insertion(+)drivers/iio/industrialio-core.c +1
-0@@ -588,6 +588,7 @@ static ssize_t __iio_format_value(char *buf, size_t len, unsigned int type,return snprintf (buf, len,"%d" , vals[0 ]);case IIO_VAL_INT_PLUS_MICRO_DB : scale_db = true; +/* fall through */ case IIO_VAL_INT_PLUS_MICRO :if (vals[1 ] <0 ) return snprintf(buf, len, "-%d.%06u%s", abs(vals[0]),