[Freeciv-tickets] [freeciv] #47959: dai_select_tech() clang analyzer warning about garbage value

Back to archive index
OSDN Ticket System norep****@osdn*****
Tue May 9 18:00:25 JST 2023


#47959: dai_select_tech() clang analyzer warning about garbage value

  Open Date: 2023-04-27 23:43
Last Update: 2023-05-09 12:00

URL for this Ticket:
    https://osdn.net//projects/freeciv/ticket/47959
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=47959

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2023-05-09 12:00 Updated by: cazfi
 * Status Update from Open to Closed
 * Resolution Update from Accepted to Fixed


---------------------------------------------------------------------
Ticket Status:

      Reporter: cazfi
         Owner: cazfi
          Type: Bugs
        Status: Closed
      Priority: 5 - Medium
     MileStone: 3.0.8
     Component: AI
      Severity: 5 - Medium
    Resolution: Fixed
---------------------------------------------------------------------

Ticket details:

../../../../src/ai/default/aitech.c:173:26: warning: The left operand of '>' is a garbage value [core.UndefinedBinaryOperatorResult]
      if (goal_values[i] > goal_values[newgoal]
This is likely to be false positive. Analyzer just doesn't know that on each iteration valid_advance_by_number() will filter exactly same techs out, i.e., the same indices are initialized and used.
This ticket is about fixing the clang analyzer warning. There's space for refactoring, but will open separate ticket about that.

-- 
Ticket information of Freeciv project
Freeciv Project is hosted on OSDN

Project URL: https://osdn.net/projects/freeciv/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/freeciv/ticket/47959
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=47959



More information about the Freeciv-tickets mailing list
Back to archive index