[Freeciv-tickets] [freeciv] #44617: distribute() fingerprint

Back to archive index
OSDN Ticket System norep****@osdn*****
Sat May 28 17:29:35 JST 2022


#44617: distribute() fingerprint

  Open Date: 2022-05-16 02:07
Last Update: 2022-05-28 11:29

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

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

Last Changes/Comment on this Ticket:
2022-05-28 11:29 Updated by: cazfi
 * Milestone Update from (None) to 3.0.3


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

      Reporter: cazfi
         Owner: (None)
          Type: Patches
        Status: Open
      Priority: 5 - Medium
     MileStone: 3.0.3
     Component: General
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

Ticket details:

distribute() should not accept negative number of groups nor rates. It's fingerprint should be changed to:
void distribute(int number, unsigned groups, const unsigned *ratios, int *result);
I assume that this change would silence clang analyzer warning we're getting about the function - seems to me that the path leading to the problem can be taken only when 'groups' is negative.

-- 
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/44617
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=44617



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