Last Comment Bug 650871 - nsHttpConnectionMgr.cpp:1064:56: warning: comparison between signed and unsigned integer expressions
: nsHttpConnectionMgr.cpp:1064:56: warning: comparison between signed and unsig...
Product: Core
Classification: Components
Component: Networking: HTTP (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla6
Assigned To: Daniel Holbert [:dholbert]
: Patrick McManus [:mcmanus]
Depends on:
Blocks: 624739
  Show dependency treegraph
Reported: 2011-04-18 11:12 PDT by Daniel Holbert [:dholbert]
Modified: 2011-04-20 01:41 PDT (History)
1 user (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

fix (1.21 KB, patch)
2011-04-18 11:16 PDT, Daniel Holbert [:dholbert]
cbiesinger: review+
mcmanus: review+
Details | Diff | Splinter Review
hg changeset for checkin (1.33 KB, patch)
2011-04-19 11:44 PDT, Daniel Holbert [:dholbert]
no flags Details | Diff | Splinter Review

Description Daniel Holbert [:dholbert] 2011-04-18 11:12:52 PDT
Filing bug on this warning in up-to-date mozilla-central:
> netwerk/protocol/http/nsHttpConnectionMgr.cpp: In member function ‘void nsHttpConnectionMgr::OnMsgReclaimConnection(PRInt32, void*)’:
> netwerk/protocol/http/nsHttpConnectionMgr.cpp:1064:56: warning: comparison between signed and unsigned integer expressions

The flagged code is:
> 1063             PRInt32 idx;
> 1064             for (idx = 0; idx < ent->mIdleConns.Length(); idx++) {
> 1065                 nsHttpConnection *idleConn = ent->mIdleConns[idx];

Looks like idx just wants to be a PRUint32.
Comment 1 Daniel Holbert [:dholbert] 2011-04-18 11:16:36 PDT
Created attachment 526769 [details] [diff] [review]
Comment 2 Daniel Holbert [:dholbert] 2011-04-18 11:19:10 PDT
Note: The last usage of |idx| is line 1071 (the last line in the patch's context):^[^\0]*%24&hitlimit=&tree=mozilla-central
Comment 3 Daniel Holbert [:dholbert] 2011-04-19 11:44:38 PDT
Created attachment 527060 [details] [diff] [review]
hg changeset for checkin

Here's the changeset for checkin. (I can't treewatch at the moment; hoping some kind soul can land this & bug 650987 as ridealongs)
Comment 4 Mounir Lamouri (:mounir) 2011-04-20 01:41:49 PDT

Note You need to log in before you can comment on or make changes to this bug.