Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: a break statement is missing (very likely) #4624

Closed
ustchcs-bugfinder opened this issue Aug 12, 2020 · 0 comments
Closed

Bug: a break statement is missing (very likely) #4624

ustchcs-bugfinder opened this issue Aug 12, 2020 · 0 comments

Comments

@ustchcs-bugfinder
Copy link

ustchcs-bugfinder commented Aug 12, 2020

k = 4;

switch (m_lar_solver.get_column_type(j)) {
        
    case lp::column_type::fixed:
        k = 0;
        break;
    case lp::column_type::boxed:
        k = 2;
        break;
    case lp::column_type::lower_bound:
    case lp::column_type::upper_bound:
        k = 4;                                             // break is MISSING?
    case lp::column_type::free_column:
        k = 6;
        break;
    default:
        UNREACHABLE();
        break;
    }

Reported by: USTCHCS Analysis Toolsuite Bugfinder
(bugfinder-9.3: Each non-empty case of switch statement should be ended with an unconditional break, throw or return statement.)

NikolajBjorner added a commit that referenced this issue Aug 13, 2020
Signed-off-by: Nikolaj Bjorner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant