floppy: Fix fall-through warning for Clang
Subsystems (2)
PATCH v2 1/1 floppy: Fix fall-through warning for Clang
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case.
---
Changes in v2:
- Add a break statement instead of fallthrough;
drivers/block/floppy.c | 1 + 1 file changed, 1 insertion(+)
drivers/block/floppy.c +1 -0
@@ -2123,6 +2123,7 @@ static void format_interrupt(void)switch (interpret_errors ()) {case 1 : cont->error (); +break ;case 2 :break ;case 0 :
Signature · 1 line
2.27.0
Hi,
Quoted 8 lines · Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case.
Applied, thanks!
https://github.com/evdenis/linux-floppy/commit/6eaddb2a2aa3acd0660537f9f6a12785be0ae830
I will send it to Jens with other floppy patches.
It will be in 5.14
Regards,
Denis
Quoted 20 lines
---
Changes in v2:
- Add a break statement instead of fallthrough;drivers/block/floppy.c | 1 + 1 file changed, 1 insertion(+)drivers/block/floppy.c +1
-0@@ -2123,6 +2123,7 @@ static void format_interrupt(void)switch (interpret_errors ()) {case 1 : cont->error (); +break ;case 2 :break ;case 0 :
Quoted 12 lines · Denis Efremov
Hi,
Quoted 8 lines · Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case.
Quoted 5 lines
Applied, thanks!
https://github.com/evdenis/linux-floppy/commit/6eaddb2a2aa3acd0660537f9f6a12785be0ae830I will send it to Jens with other floppy patches.
It will be in 5.14
Awesome. :)
Thanks, Denis.
--
Gustavo