Closed
Bug 604158
Opened 15 years ago
Closed 15 years ago
nsGeolocation.cpp:762: warning: comparison between signed and unsigned integer expressions
Categories
(Core :: DOM: Geolocation, defect)
Core
DOM: Geolocation
Tracking
()
RESOLVED
FIXED
mozilla2.0b7
People
(Reporter: dholbert, Assigned: dholbert)
References
Details
(Whiteboard: [build_warning])
Attachments
(1 file, 1 obsolete file)
|
1.57 KB,
patch
|
dougt
:
review+
dougt
:
approval2.0+
|
Details | Diff | Splinter Review |
../../../../mozilla/dom/src/geolocation/nsGeolocation.cpp: In member function ‘nsresult nsGeolocationService::StartDevice()’:
../../../../mozilla/dom/src/geolocation/nsGeolocation.cpp:762: warning: comparison between signed and unsigned integer expressions
../../../../mozilla/dom/src/geolocation/nsGeolocation.cpp: In member function ‘void nsGeolocationService::StopDevice()’:
../../../../mozilla/dom/src/geolocation/nsGeolocation.cpp:806: warning: comparison between signed and unsigned integer expressions
In both cases, the problem is that we're using an unsigned value to iterate through a nsCOMArray (whose Length() method returns a *signed* value). So each comparison vs Length() is unsigned vs signed.
| Assignee | ||
Updated•15 years ago
|
| Assignee | ||
Comment 1•15 years ago
|
||
Fix: just use a PRInt32 instead of PRUint32. (also fixes some whitespace on blank line in contextual code)
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #482948 -
Flags: review?(doug.turner)
Attachment #482948 -
Flags: approval2.0?
| Assignee | ||
Comment 2•15 years ago
|
||
Made one more whitespace tweak -- replacing
> i <mProviders.Count()
with
> i < mProviders.Count();
on the latter of the two fixed lines.
Attachment #482952 -
Flags: review?(doug.turner)
Attachment #482952 -
Flags: approval2.0?
| Assignee | ||
Updated•15 years ago
|
Attachment #482948 -
Attachment is obsolete: true
Attachment #482948 -
Flags: review?(doug.turner)
Attachment #482948 -
Flags: approval2.0?
Comment 3•15 years ago
|
||
Comment on attachment 482952 [details] [diff] [review]
fix
low risk, fixes warnings
Attachment #482952 -
Flags: review?(doug.turner)
Attachment #482952 -
Flags: review+
Attachment #482952 -
Flags: approval2.0?
Attachment #482952 -
Flags: approval2.0+
| Assignee | ||
Comment 4•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b8
Updated•15 years ago
|
Target Milestone: mozilla2.0b8 → mozilla2.0b7
You need to log in
before you can comment on or make changes to this bug.
Description
•