Closed Bug 127489 Opened 23 years ago Closed 23 years ago

nsDefaultSOAPEncoder.cpp: `PRInt32 p' might be used uninitialized in this function

Categories

(Core :: XML, defect)

x86
Linux
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 127419

People

(Reporter: mozilla-bugs, Assigned: rayw)

References

()

Details

Attachments

(1 file)

extensions/xmlextras/soap/src/nsDefaultSOAPEncoder.cpp produces a number of `PRInt32 p' might be used uninitialized in this function warning during compilation. They all seem to come from the DECODE_ARRAY macro and something is definitely weird in there (see http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/extensions/xmlextras/soap/src/nsDefaultSOAPEncoder.cpp&mark=2798,2801,2808,2810#2789 ) : PRInt32 p;\ if (nsSOAPUtils::GetAttribute(aEncoding, aSource, nsSOAPUtils::kSOAPEncURI,\ kSOAPArrayPositionAttribute, pos)) {\ PRInt32 p = DecodeArrayPosition(pos, dimensionCount, dimensionSizes);\ if (p == -1) {\ rc = NS_ERROR_ILLEGAL_VALUE;\ break;\ }\ }\ else {\ p = next++;\ }\ Should't the "PRInt32 p = ..." be just "p = ..."???
Attached patch 1-line patch to fix the macro (deleted) — Splinter Review
Blocks: 59652
Keywords: mozilla1.0, patch, review
I need to fix this -- clearly broken for certain cases.
Assignee: heikki → rayw
Wow, somebody else beat me to filing this... *** This bug has been marked as a duplicate of 127419 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
verified wow, somebody else did also file this :)
Status: RESOLVED → VERIFIED
Yeah, I am trying to make sure Mozilla has as few of these warnings as possible (see bug 59652), I even have a script that watches TBox and notifies me whenever a new warning appears. Some of these warnings are harmless, but some (for example. bug 81851 and bug 125795) turn out to be real bugs that take days to track down if the warning is ignored (bug 125795 was cause bu a check-in to bug 96870 which I reopened because of the warning, but that was ignored until it was discovered that bug 125795 was caused by an uninitialized variable)...
My sincerest appreciation on this (both filings), as well! Clearly a significant bug was lurking there, and I am doing my best to fix up any rough edges on SOAP for the upcoming Mozilla releases.
No longer blocks: 59652
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: