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

Back to archive index
OSDN Ticket System norep****@osdn*****
Wed Jun 22 06:12:26 JST 2022


#44617: distribute() fingerprint

  Open Date: 2022-05-16 02:07
Last Update: 2022-06-22 00:12

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-06-22 00:12 Updated by: cazfi
 * Status Update from Open to Closed
 * Resolution Update from Accepted to Fixed


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

      Reporter: cazfi
         Owner: cazfi
          Type: Patches
        Status: Closed
      Priority: 5 - Medium
     MileStone: 3.0.3
     Component: General
      Severity: 5 - Medium
    Resolution: Fixed
---------------------------------------------------------------------

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