Closed Bug 59666 Opened 24 years ago Closed 24 years ago

Occurances of uninitialized variables being used before being set.

Categories

(Core :: Internationalization, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: rich.burridge, Assigned: shanjian)

References

Details

Attachments

(5 files)

For more details on this problem, see: http://bugzilla.mozilla.org/show_bug.cgi?id=59652 This bug is just for the warnings in various source files in the Internationization module: nsUnicodeToISO2022JP.cpp:153: warning: `nsresult res' might be used uninitialized in this function ---- nsCharDetModule.cpp:151: warning: `nsresult rv' might be used uninitialized in this function ---- nsPSMDetectors.cpp:442: warning: `PRInt32 bestIdx' might be used uninitialized in this function ----
Reassign to shanjian.
Assignee: nhotta → shanjian
Blocks: 59652
Attached patch patch 1 (deleted) — Splinter Review
Attached patch patch 2 (deleted) — Splinter Review
Attached patch patch 3 (deleted) — Splinter Review
The first 2 places seems fine. The 3rd is very likely to cause crashes. Let me know when and where should I check in those fixes. (Please email me directly.) frank, please review those changes.
Status: NEW → ASSIGNED
It's too late to check in to the RTM branch, so I'm assuming these changes will need to be checked into the Mozilla trunk. We (Sun) will also be adding similar changes to our OEM source code branch for our RTM/FCS release. Thanks for finding/fixing these so quickly!
For the first patch, should it be initialized as NS_OK or an error? Cata, do you have any idea?
The only case that res will not be assigned before it is returned by is Src >= SrcEnd, and that is the length equal to 0. Since there is nothing to do, we cann't say it's a failure.
Okay, r=nhotta for three patches (Frank is not available now), please get a super review.
Patch 3 seems to have some indentation problems. Maybe you have tabs in there? There should not be any tabs in Mozilla source. Please fix this, and re-submit Patch 3. Then I will give sr=.
Attached patch new patch, part3 (deleted) — Splinter Review
Attached patch new patch, part 2 (deleted) — Splinter Review
new patch remove tab to spaces.
Shanjian, the Mozilla convention is to use 2 spaces to indent. http://www.mozilla.org/newlayout/doc/codingconventions.html No need to attach new patches. sr=erik as long as you change it to 2 spaces
fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Blocks: 60740
Changes also checked into the OEM branch.
Changed QA contact to shanjian@netscape.com. Shanjian, QA cannot verify this. Please mark as verified.
QA Contact: teruko → shanjian
mark it verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: