Unitialized variables in js/src/xpconnect/src

RESOLVED FIXED

Status

()

Core
DOM
RESOLVED FIXED
16 years ago
5 years ago

People

(Reporter: Heikki Toivonen (remove -bugzilla when emailing directly), Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

I decided to take a look at these, and found one that actually is real. The
others seem to be just the compiler's inability to realize that they will never
be used uninitialized.
Created attachment 74500 [details] [diff] [review]
Proposed fix

This is real if we jump through goto to done before initializing:

js/src/xpconnect/src/xpcwrappednative.cpp:1627
`uint8 paramCount' might be used uninitialized in this function

1625 const nsXPTMethodInfo* methodInfo;
1626 uint8 requiredArgs;
1627 uint8 paramCount;
1628 jsval src;
1629 nsresult invokeResult;

I fixed the other ones so that it will be easier to notice new errors.
Mass-reassigning bugs to dom_bugs@netscape.com
Assignee: jst → dom_bugs

Comment 3

14 years ago
This patch to remove warnings of unitialized variables still seems to be
relevant. Do we want to take it?
Assignee: general → nobody
QA Contact: gerardok → general

Updated

6 years ago
Blocks: 187528
All variables named |paramCount| in js/xpconnect/src/XPCWrappedNative.cpp (as it's now called) are initialized at declaration time.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.