#45850: sdl2 gui_string.c: Refactor sizeof_font_tab out Open Date: 2022-10-13 06:44 Last Update: 2022-10-16 08:48 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/45850 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=45850 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2022-10-16 08:48 Updated by: cazfi * Owner Update from (None) to cazfi * Resolution Update from None to Accepted * Milestone Update from (None) to 3.0.5 --------------------------------------------------------------------- Ticket Status: Reporter: cazfi Owner: cazfi Type: Patches Status: Open [Owner assigned] Priority: 5 - Medium MileStone: 3.0.5 Component: SDL2-client Severity: 5 - Medium Resolution: Accepted --------------------------------------------------------------------- Ticket details: Clang analyzer gives a couple of "NULL dereference" -warnings about sdl2-client gui_string.c. I don't think those are valid, as they would occur only if sizeof_font_tab and the actual length of the linked list would be out of sync and I don't see a way for that to happen. Still, that double accounting design makes no sense; we have a terminated linked list which we iterate through by counting steps to reach its assumed end. Let's refactor sizeof_font_tab out. -- 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/45850 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=45850