Closed Bug 59670 Opened 20 years ago Closed 17 years ago

Occurances of uninitialized variables being used before being set (xpinstall/wizard).

Categories

(SeaMonkey :: Installer, defect, P2)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: rich.burridge, Assigned: dveditz)

References

Details

Attachments

(1 file)

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
Installer module:

nsZipArchive.cpp:532: warning: `PRBool regExp' might be used uninitialized in
this function
nsZipArchive.cpp:1010: warning: `PRUint32 bigBufSize' might be used
uninitialized in this function
----
nsJAR.cpp:714: warning:   because conversion sequence for the argument is
betternsJAR.cpp:590: warning: `class nsJARManifestItem * curItemMF' might be
used uninitialized in this function
----
../nsZipArchive.cpp:532: warning: `PRBool regExp' might be used uninitialized in
this function
../nsZipArchive.cpp:1010: warning: `PRUint32 bigBufSize' might be used
uninitialized in this function
----
../nsJAR.cpp:590: warning: `class nsJARManifestItem * curItemMF' might be used
uninitialized in this function
----
Two more occurances:

/xpinstall/src/nsInstallPatch.cpp
nsInstallPatch.cpp:950: warning: `int32 err' might be used uninitialized in this
function
../../dist/include/nsAReadableString.h:1085: warning: `int whichString' might be
used uninitialized in this function
----
/xpinstall/src/nsInstallProgressDialog.cpp
nsInstallProgressDialog.cpp:226: warning: `nsresult rv' might be used
uninitialized in this function
----
Status: NEW → ASSIGNED
Blocks: 59652
Priority: P3 → P2
Reassigning since Sean will be swamped with wizard work.
Assignee: ssu → dveditz
Status: ASSIGNED → NEW
Keywords: nsbeta1
Keywords: nsbeta1mozilla1.0
Currently (http://tinderbox.mozilla.org/SeaMonkey/warn1010759460.5770.html) I
see the following warnings:

xpinstall/wizard/libxpnet/src/nsHTTPConn.cpp:356
 `int total' might be used uninitialized in this function

xpinstall/wizard/libxpnet/test/TestLibxpnet.cpp:82
 `time_t startTime' might be used uninitialized in this function
 `time_t endTime' might be used uninitialized in this function

xpinstall/wizard/unix/src2/nsInstallDlg.cpp:1134
 `int err' might be used uninitialized in this function

xpinstall/wizard/unix/src2/nsInstallDlg.cpp:924
 `char * text' might be used uninitialized in this function
Summary: Occurances of uninitialized variables being used before being set. → Occurances of uninitialized variables being used before being set (xpinstall).
Status: NEW → ASSIGNED
The nsHTTPConn.cpp warning appears to be a real bug. If fwritePos is NULL,
aCallback will be called with an uninitialized second argument:
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/xpinstall/wizard/libxpnet/src/nsHTTPConn.cpp&mark=403,416,433#400

This code was commited by jelwell@netscape.com for bug 87793.
Summary: Occurances of uninitialized variables being used before being set (xpinstall). → Occurances of uninitialized variables being used before being set (xpinstall/wizard).
Attachment #107045 - Flags: superreview?
Attachment #107045 - Flags: review?(dveditz)
Comment on attachment 107045 [details] [diff] [review]
Fix the issues reported by compiler warnings.

r=dveditz
Attachment #107045 - Flags: review?(dveditz) → review+
Comment on attachment 107045 [details] [diff] [review]
Fix the issues reported by compiler warnings.

I can't r= and sr= the same bug
Comment on attachment 107045 [details] [diff] [review]
Fix the issues reported by compiler warnings.

> I can't r= and sr= the same bug

Bugzilla was not saying that you were asked for an sr, Bugzilla though (known
bug) that you were the one *requesting* it. And the requestee just was not
specified at all.

Hopefully brendan@mozilla.org is the right person to ask, and if not could you
please ask somebody else? Thanks!
Attachment #107045 - Flags: superreview? → superreview?(brendan)
Comment on attachment 107045 [details] [diff] [review]
Fix the issues reported by compiler warnings.

rs=brendan@mozilla.org, but I didn't study the nsHTTPConn.cpp code enough to
understand why total = 0 is right.  I'm gonna assume that the owner is all over
the logic here.

/be
Attachment #107045 - Flags: superreview?(brendan) → superreview+
dveditz, can you please check this in (I do not have CVS access). Thanks!
Flags: wanted1.3a?
Attachment #107045 - Flags: in?(dveditz)
Attachment #107045 - Flags: checked
We're not going to hold 1.3a for this. That doesn't mean that the fix won't be
included in 1.3a. (The "wanted1.3a" flag has been changed to "blocking1.3a" to
more accurately reflect how the flag is used by drivers@mozilla.org). 
Flags: blocking1.3a? → blocking1.3a-
Comment on attachment 107045 [details] [diff] [review]
Fix the issues reported by compiler warnings.

Patch checked in. Aleksey, can you close the bug?
Attachment #107045 - Flags: checkin?(dveditz)
brad TBox does not show any "uninitialized" warnings left in xpinstall/wizard.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
verified code fix
Status: RESOLVED → VERIFIED
QA Contact: bugzilla → gbush
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.