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

Back to archive index
OSDN Ticket System norep****@osdn*****
Wed Jun 15 09:57:42 JST 2022


#44617: distribute() fingerprint

  Open Date: 2022-05-16 02:07
Last Update: 2022-06-15 03:57

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-15 03:57 Updated by: cazfi
 * Owner Update from (None) to cazfi
 * Resolution Update from None to Accepted


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

      Reporter: cazfi
         Owner: cazfi
          Type: Patches
        Status: Open [Owner assigned]
      Priority: 5 - Medium
     MileStone: 3.0.3
     Component: General
      Severity: 5 - Medium
    Resolution: Accepted
---------------------------------------------------------------------

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