Closed Bug 788884 Opened 11 years ago Closed 11 years ago

nsBrowserApp.cpp: Compiler warning about different signs in comparison

Categories

(Firefox OS Graveyard :: General, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: tzimmermann, Assigned: tzimmermann)

Details

Attachments

(1 file)

gcc 4.7 warns about signs in a comparison.

> make[6]: Entering directory `/home/tdz/Projects/mozilla/build/mozilla-central/b2g/app'
> /home/tdz/Projects/mozilla/src/mozilla-central/b2g/app/nsBrowserApp.cpp: In function 'int main(int, char**)':
> /home/tdz/Projects/mozilla/src/mozilla-central/b2g/app/nsBrowserApp.cpp:167:78: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Assignee: nobody → tdz
Attachment #658689 - Flags: review?(benjamin)
Comment on attachment 658689 [details] [diff] [review]
Patch for fixing the warning + a potential integer underflow

A cast would be fine here; we aren't dealing with untrusted input, but this works.
Attachment #658689 - Flags: review?(benjamin) → review+
https://hg.mozilla.org/mozilla-central/rev/0916293611ce
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.