Occurences of uninitialized variables being used before being set (in directory/xpcom)

RESOLVED DUPLICATE of bug 152700

Status

Directory
LDAP XPCOM SDK
RESOLVED DUPLICATE of bug 152700
16 years ago
15 years ago

People

(Reporter: Aleksey Nogin, Assigned: dmose)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

16 years ago
This bug is just for the "xxx might be used uninitialized" warnings in various
source files in directory/xpcom. Currently brad TBox shows the following warnings:

directory/xpcom/base/src/nsLDAPBERValue.cpp:59
 `PRUint8 * array' might be used uninitialized in this function

directory/xpcom/base/src/nsLDAPMessage.cpp:589
 `nsresult rv' might be used uninitialized in this function

P.S. See nug 59652 and 179819 for more information. Bug 59652 is the meta-bug
tracking the fight against these (potentially very nasty) warnings and bug
179819 wants such warnings turned into compilation errors.

Comment 1

16 years ago
Created attachment 110940 [details] [diff] [review]
Fixed warnings

* nsLDAPMessage.cpp: Always returns NS_ERROR_OUT_OF_MEMORY since rv is not set.

* nsLDAPBERValue.cpp: Moved setting of returned array into if() construct.

Comment 2

16 years ago
Fix and warnings are the same as in bug <A
HREF="http://bugzilla.mozilla.org/show_bug.cgi?id=152700">152700</A>.
(Reporter)

Comment 3

16 years ago
Yeah, seems like a dup...

*** This bug has been marked as a duplicate of 152700 ***
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → DUPLICATE
No longer blocks: 59652, 179819
You need to log in before you can comment on or make changes to this bug.