Closed Bug 31553 Opened 25 years ago Closed 25 years ago

Build warning looking serious (uninitialized variable used)

Categories

(Core :: Layout: Form Controls, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: bratell, Assigned: pollmann)

References

()

Details

(Whiteboard: fix in hand)

During build I get a warning: j:\mozilla\mozilla\layout\html\content\src\nsHTMLSelectElement.cpp(492) : warning C4700: local variable 'result' used without having been initialized which sounds bad. http://lxr.mozilla.org/seamonkey/source/layout/html/content/src/nsHTMLSelectElem ent.cpp#492 PRUint32 curlen; 489 nsresult result; 490 GetLength(&curlen); 491 if (curlen && (curlen > aLength)) { // Remove extra options 492 for (PRInt32 i = (curlen - 1); (i>=(PRInt32)aLength) && NS_SUCCEEDED(result); i--) { 493 result = Remove(i); 494 } 495 } else { // Add options? 496 }
Eric, you are "blamed" for this code, so if you could take a look. The var "result" isn't initialized
Assignee: rods → pollmann
Oh my... Of course, this was suppsed to be "result = GetLength(&curlen);" I'll check in the fix as soon as the tree opens to general checkins.
Status: NEW → ASSIGNED
Whiteboard: fix in hand
Target Milestone: M15
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Verifying fixed (codelevel)
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.