Closed Bug 444409 Opened 17 years ago Closed 17 years ago

outparam 'this' not written on NS_SUCCEEDED(return value)

Categories

(Developer Infrastructure :: Source Code Analysis, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: benjamin, Assigned: dmandelin)

Details

Attachments

(1 file)

../../../dist/include/string/nsTSubstring.h: In member function ‘void nsAString_internal::SetDataFlags(PRUint32)’: ../../../dist/include/string/nsTSubstring.h:638: warning: outparam 'this' not written on NS_SUCCEEDED(return value) ../../../dist/include/string/nsTSubstring.h:634: outparam declared here Something's wrong with the outparam analysis... it's trying to analyze methods which are not supposed to be analyzed, I think. And it's claiming "this" as an outparam, which is even weirder.
Attached patch PatchSplinter Review
Argh. Somehow it's always been harder to get right the semantics of the spec for what is an outparam than the high-tech analysis stuff. Anyway, I overhauled that part for the last update, and introduced a bug. Part of the old bug was that OUTNOFAIL (outparam, function never fails to write it ever) stuff wasn't getting checked, which is bad when it's OUTNOFAIL because the function returns void, because void-returning functions should be checked. But I forgot that OUTNOFAIL was also used for 'this' in string mutators. This is correct when they are callees, but we don't want to analyze them (and the script doesn't analyze them correctly).
Attachment #328785 - Flags: review?(benjamin)
Attachment #328785 - Flags: review?(benjamin) → review+
Pushed.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Product: Core → Firefox Build System
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: