Closed
Bug 59676
Opened 24 years ago
Closed 13 years ago
Occurences of uninitialized variables being used before being set (widget/src)
Categories
(Core :: XUL, defect, P4)
Core
XUL
Tracking
()
RESOLVED
WORKSFORME
mozilla1.0.1
People
(Reporter: rich.burridge, Unassigned)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
Details | Diff | Splinter Review |
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 XPToolkit/
Widget module:
/widget/src/xlib/nsClipboard.cpp
nsClipboard.cpp:577: warning: `PRUnichar * unicodeData' might be used
uninitialized in this function
nsClipboard.cpp:620: warning: `PRUnichar * unicodeData' might be used
uninitialized in this function
----
nsSound.cpp:136: warning: `long int rate' might be used uninitialized in this
function
nsSound.cpp:137: warning: `int bits_per_sample' might be used uninitialized in
this function
----
nsWidget.cpp:1689: warning: `gint x' might be used uninitialized in this
function
nsWidget.cpp:1689: warning: `gint y' might be used uninitialized in this
function
----
nsWindow.cpp:2252: warning: `nsresult result' might be used uninitialized in
this function
----
Comment 1•24 years ago
|
||
Should really be separate bugs, but I'll give this to Pink to fix clipboard and
pass along to the next owner. P4/Moz0.8
Assignee: trudelle → pinkerton
Priority: P3 → P4
Target Milestone: --- → mozilla0.8
Comment 2•24 years ago
|
||
ok, well, the clipboard file referenced here doesn't have the given lines (it
only has 406), so I don't know what is going on. pushing off to the next person
on the list (which would be pav).
Assignee: pinkerton → pavlov
Updated•24 years ago
|
Status: NEW → ASSIGNED
Target Milestone: mozilla0.8 → mozilla0.9.1
Updated•24 years ago
|
Target Milestone: mozilla0.9.1 → mozilla1.0
Comment 3•23 years ago
|
||
Bugs targeted at mozilla1.0 without the mozilla1.0 keyword moved to mozilla1.0.1
(you can query for this string to delete spam or retrieve the list of bugs I've
moved)
Target Milestone: mozilla1.0 → mozilla1.0.1
Comment 4•23 years ago
|
||
Current (http://tinderbox.mozilla.org/SeaMonkey/warn1013026020.23864.html - Wed,
06 Feb 2002 15:07 EST) warnings in widget/src:
widget/src/cocoa/nsClipboard.cpp:606
`PRUnichar * unicodeData' might be used uninitialized in this function
widget/src/cocoa/nsClipboard.cpp:651
`PRUnichar * unicodeData' might be used uninitialized in this function
widget/src/cocoa/nsSound.cpp:142
`long int rate' might be used uninitialized in this function
widget/src/cocoa/nsSound.cpp:143
`int bits_per_sample' might be used uninitialized in this function
widget/src/xlib/nsWidget.cpp:1584
`gint x' might be used uninitialized in this function
`gint y' might be used uninitialized in this function
Keywords: mozilla1.0
Summary: Occurances of uninitialized variables being used before being set. → Occurances of uninitialized variables being used before being set (widget/src)
Comment 5•23 years ago
|
||
The last warning is only listed as widget/src/xlib/nsWidget.cpp because of TBox
bug 124614. In reality it's widget/src/gtk/nsWidget.cpp. There something weird
is goind on - the same values are assigned twice for no good reason...
Comment 6•23 years ago
|
||
If aGdkMotionEvent is non-NULL, event.point.x and event.point.y would already
be set earlier, so setting them again (to the same exact thing) does not make
much sense. I am missing anything?
Updated•23 years ago
|
Updated•22 years ago
|
Attachment #70338 -
Flags: superreview?
Attachment #70338 -
Flags: review?
Comment 7•22 years ago
|
||
Comment on attachment 70338 [details] [diff] [review]
Remove redundant code, get rid of warnings
You are right. In the future, for faster response, ask specific people for
review and super review. Ask around on #mozilla.
Attachment #70338 -
Flags: superreview?(bryner)
Attachment #70338 -
Flags: superreview?
Attachment #70338 -
Flags: review?
Attachment #70338 -
Flags: review+
Updated•22 years ago
|
Attachment #70338 -
Flags: superreview?(bryner) → superreview+
Comment 8•22 years ago
|
||
Comment on attachment 70338 [details] [diff] [review]
Remove redundant code, get rid of warnings
Can somebody check this in (I do not have CVS access)? Thanks a lot!
Updated•22 years ago
|
Flags: wanted1.3a?
Updated•22 years ago
|
Attachment #70338 -
Flags: in?
Attachment #70338 -
Flags: checked
Comment 9•22 years ago
|
||
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 10•22 years ago
|
||
Comment on attachment 70338 [details] [diff] [review]
Remove redundant code, get rid of warnings
Patch checked in. I don't know if the bug should be closed so can you do it,
Aleksey?
Attachment #70338 -
Flags: checkin?
Comment 11•22 years ago
|
||
Comment on attachment 70338 [details] [diff] [review]
Remove redundant code, get rid of warnings
brad TBox shows the following "uninitialized" warnings left in widget/src:
widget/src/gtk/nsClipboard.cpp:609
`PRUnichar * unicodeData' might be used uninitialized in this function
widget/src/gtk/nsClipboard.cpp:654
`PRUnichar * unicodeData' might be used uninitialized in this function
widget/src/gtk/nsSound.cpp:142
`long int rate' might be used uninitialized in this function
widget/src/gtk/nsSound.cpp:143
`int bits_per_sample' might be used uninitialized in this function
Attachment #70338 -
Attachment is obsolete: true
Comment 12•22 years ago
|
||
Updated•22 years ago
|
Summary: Occurances of uninitialized variables being used before being set (widget/src) → Occurences of uninitialized variables being used before being set (widget/src)
Comment 13•20 years ago
|
||
I also see:
d:/mozilla/mozilla/widget/src/windows/nsDataObj.cpp:82: warning: `CLSID_nsDataOb
j' initialized and declared `extern'
d:/mozilla/mozilla/widget/src/windows/nsDataObj.cpp:82: warning: `__cdecl__' att
ribute only applies to function types
d:/mozilla/mozilla/widget/src/windows/nsDataObj.cpp: In function `void MangleTex
tToValidFilename(nsString&)':
d:/mozilla/mozilla/widget/src/windows/nsDataObj.cpp:519: warning: comparison bet
ween signed and unsigned integer expressions
d:/mozilla/mozilla/widget/src/windows/nsDataObj.cpp:523: warning: comparison bet
ween signed and unsigned integer expressions
{standard input}:2767: Warning: Ignoring changed section attributes for .text
d:/mozilla/mozilla/widget/src/windows/nsDataObjCollection.cpp:62: warning: `CLSI
D_nsDataObjCollection' initialized and declared `extern'
d:/mozilla/mozilla/widget/src/windows/nsDataObjCollection.cpp:62: warning: `__cd
ecl__' attribute only applies to function types
d:/mozilla/mozilla/widget/src/windows/nsClipboard.cpp: In static member function
`static PRBool nsClipboard::FindPlatformHTML(IDataObject*, UINT, void**, PRUint
32*)':
d:/mozilla/mozilla/widget/src/windows/nsClipboard.cpp:684: warning: int format,
PRUint32 arg (arg 4)
d:/mozilla/mozilla/widget/src/windows/nsClipboard.cpp:684: warning: int format,
PRUint32 arg (arg 5)
Updated•18 years ago
|
Assignee: pavlov → jag
Status: ASSIGNED → NEW
QA Contact: jrgmorrison → xptoolkit.widgets
Updated•16 years ago
|
Assignee: jag → nobody
Comment 14•13 years ago
|
||
Surprisingly, there is no warning at all in the widget/src code (using gcc4.6.1 on linux).
Hence closing this bug.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•