[splint-discuss] how to annotate a pointer to static memory returned by a function

Tommy Pettersson ptp at lysator.liu.se
Sat Mar 10 06:51:21 PST 2007


On Mon, Mar 05, 2007 at 11:45:26AM -0300, Jorge Peixoto de Morais Neto wrote:
> 
> Perhaps the splint's unixlib should be enhanced?

They are old and don't know about dirname and basename. It is
not very difficult to update them and generate new(er) lcd
files, but no one is currently maintaining the splint source.

> PS: How would owned/dependent work? splint would still expect the memory to
> be deallocated, wouldn't it?

I don't know the exact rules, but a dependent pointer can be
free:ed wheres free:ing a shared pointer generates a splint
warning, so you are right that shared is the better choice.


-- 
Tommy Pettersson <ptp at lysator.liu.se>


More information about the splint-discuss mailing list