Static Analyzer Question -- Suppressing Message in Special Circumstances
Static Analyzer Question -- Suppressing Message in Special Circumstances
- Subject: Static Analyzer Question -- Suppressing Message in Special Circumstances
- From: Thomas Wetmore <email@hidden>
- Date: Mon, 04 Oct 2010 18:48:18 -0400
This is a question about the static analyzer.
I wrote a language interpreter as part of a genealogical application that allows users to write scripts to define reports and other forms of database access and computation. During the evaluation phase of the interpreter (when programs written in the language are being executed) I follow a strict memory management policy where all evaluate methods are required to create and return values that have been retained, and all higher level evaluate methods (evaluation is inherently recursive) are required to release the previously retained objects (unless they return them as their own values) before they return their own retained values. These evaluate methods follow similar rules as copy methods -- all methods named "evaluate" return an already retained value, and callers to these methods are responsible for releasing the values.
All this is fine until I run the static analyzer in which I get a warning from every evaluate method about returning retained values, and another warning from every release in an evaluate about releasing an unretained value. So many of these static analyzer messages are generated that I am worried I might miss some legitimate messages.
So my question is, does anyone know of a way to suppress particular static analyzer messages in those situations where I am breaking the rules, but I know I am, in order to conform to another set of conventions?
I have a short blog article about the interpreter outlining the memory strategy at:
http://deadendssoftware.blogspot.com/2010/04/deadends-interpreter-memory-management.html
Tom Wetmore, Chief Bottle Washer, DeadEnds Software
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden