Ticket #45687

gtk: Dead 'bg' assignment in create_tech_tree()

Open Date: 2022-09-23 12:22 Last Update: 2023-01-03 05:13

Reporter:
Owner:
Type:
Status:
Closed
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
3

Details

Clang analyzer warns that create_tech_tree() assignment of 'bg = COLOR_REQTREE_BACKGROUND;' is never used. That's true as following switch sets 'bg' for each possible value of the enum.

It doesn't seem like a terrible idea to have that assignment in place, in case there's ever an illegal enum value (one that the switch won't catch), but maybe we change this regardless, to avoid clang analyzer spam about it?

Ticket History (3/7 Histories)

2022-09-23 12:22 Updated by: cazfi
  • New Ticket "gtk: Dead 'bg' assignment in create_tech_tree()" created
2022-10-11 22:28 Updated by: cazfi
Comment

I think #45831 should be resolved first.

2022-12-28 06:55 Updated by: cazfi
  • Owner Update from (None) to cazfi
  • Resolution Update from None to Accepted
  • Milestone Update from (None) to 3.0.6 (closed)
2023-01-03 05:13 Updated by: cazfi
  • Status Update from Open to Closed
  • Resolution Update from Accepted to Fixed

Edit

Please login to add comment to this ticket » Login