Project

General

Profile

Bug #853520

-Wimplicit-fallthrough in research_total_bulbs_required()

Added by Marko Lindqvist 7 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Category:
General
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

When -Wimplicit-fallthrough (missing 'break' warnings) are enabled, one warning is given from research_total_bulbs_required(), research.c:898.
In this case it's not obvious by quick glance if there should be a break or is fallthrough right thing to do (fc__fallthrough from Feature #852923)

History

#1 Updated by Marko Lindqvist 7 months ago

All callers seem to always pass presearch, so the execution should never reach that point in practice. Attached patch adds an assert() and makes existing fallthrough explicit with fc__fallthrough (to fallback to setting cost by other methods)

#2 Updated by Marko Lindqvist 6 months ago

  • Status changed from Resolved to Closed
  • Assignee set to Marko Lindqvist

Also available in: Atom PDF