Closed
Bug 749229
Opened 13 years ago
Closed 13 years ago
nsEventSource.cpp:1113:35: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
Categories
(Core :: DOM: Events, defect)
Tracking
()
RESOLVED
FIXED
mozilla15
People
(Reporter: dholbert, Assigned: dholbert)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
Filing bug on this build warning:
{
/mozilla/content/base/src/nsEventSource.cpp: In member function ‘nsresult nsEventSource::SetReconnectionTimeout()’:
/mozilla/content/base/src/nsEventSource.cpp:1113:35: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
}
for this assertion:
> 1113 NS_ASSERTION(mReconnectionTime >= 0, "mReconnectionTime lies");
where mReconnectionTime is unsigned (and has been ever since it & this assertion were introduced in bug 338583):
http://hg.mozilla.org/mozilla-central/rev/a3903f835a81#l6.152
http://hg.mozilla.org/mozilla-central/rev/a3903f835a81#l5.1027
Looks like the assertion can just go away.
Assignee | ||
Comment 1•13 years ago
|
||
(this is a warning in GCC 4.6.3, FWIW - I think that's the first version of GCC to warn about this)
Assignee | ||
Comment 2•13 years ago
|
||
Assignee | ||
Comment 3•13 years ago
|
||
Note: AFAICT, this value is read from an about:config pref, and then dynamically updated later on and clamped to the range [MIN_RECONNECTION_TIME_VALUE, MAX_RECONNECTION_TIME_VALUE]
So, it doesn't look like we're particularly worried about it underflowing or anything.
Updated•13 years ago
|
Attachment #618684 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 4•13 years ago
|
||
Target Milestone: --- → mozilla15
Comment 5•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•