Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2002:
[Freeciv-Dev] Re: [FreeCiv-Cvs] rfalke: Add the ability to choose from a
Home

[Freeciv-Dev] Re: [FreeCiv-Cvs] rfalke: Add the ability to choose from a

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [FreeCiv-Cvs] rfalke: Add the ability to choose from a set of stri...
From: Jason Short <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 15 Sep 2002 23:14:09 -0500

Raimar Falke wrote:
On Thu, Aug 15, 2002 at 01:31:03PM -0700, freeciv@xxxxxxxxxxxxxxxxxxx wrote:

Add the ability to choose from a set of string options in the local
options dialog. A new callback function p_string_vals was added to the
client options to return this set.

This new input method is currently used for the audio plugin, the
soundset and the tileset. For the last two the new function
datafilelist (in common/shared) was added.


Splint found an error:

common/shared.c: (in function datafilelist)
common/shared.c:903:47: Value file_list[] may be used after being released (in 
post loop test)
  Memory (through fetch) is used after it may have been released (either by 
passing as an only param or assigning to an only global). (Use 
-strictusereleased to inhibit warning)
   common/shared.c:904:12: Storage file_list[] released

Looks like this is a spurious warning. There is a strcmp(file_list[j]...) in the test of the for-loop, and a free(file_list[j]) in the body of the loop, but the value of j changes so that no memory is freed twice.

jason



[Prev in Thread] Current Thread [Next in Thread]