Bug 385677 - src/projects/k3bdataurladdingdialog.cpp:469: possible missing break ?
Summary: src/projects/k3bdataurladdingdialog.cpp:469: possible missing break ?
Status: RESOLVED FIXED
Alias: None
Product: k3b
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: k3b developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-12 19:56 UTC by dcb314
Modified: 2020-01-21 21:28 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dcb314 2017-10-12 19:56:01 UTC
k3b-master/src/projects/k3bdataurladdingdialog.cpp:469:45: warning: this statement may fall through [-Wimplicit-fallthrough=]

Source code is

                case 2:
                    m_bFolderLinksFollowAll = true;
                case 1:
                    followLink = true;
                    break;

Maybe adding a break on case 2 would be a good idea.
Comment 1 Leslie Zhai 2017-10-13 03:25:44 UTC
Git commit 4e73356c23c6246b4907b0bece59777a4a92ce6f by Leslie Zhai.
Committed on 13/10/2017 at 03:20.
Pushed by lesliezhai into branch 'master'.

Fix switch stmt missing break issue.

A patch by dcb314@hotmail.com!

Maybe clang analyzer's false negative?

CCMAIL: artem.dergachev@gmail.com

M  +1    -0    src/projects/k3bdataurladdingdialog.cpp

https://commits.kde.org/k3b/4e73356c23c6246b4907b0bece59777a4a92ce6f
Comment 2 Albert Astals Cid 2020-01-21 21:28:40 UTC
Git commit 3cd2d2111fd7d897edbc6af202fba07bc819174a by Albert Astals Cid.
Committed on 21/01/2020 at 21:26.
Pushed by aacid into branch 'release/19.12'.

Fix adding multiple symlinks to a data project

A bit sad that the break was added because someone reported that it gave
a warning and noone took the time to read the code and say "no but the
fallthrough here is intentional"
Related: bug 416487

M  +2    -1    src/projects/k3bdataurladdingdialog.cpp

https://commits.kde.org/k3b/3cd2d2111fd7d897edbc6af202fba07bc819174a