Closed Bug 851981 Opened 12 years ago Closed 12 years ago

mozalloc_oom.cpp:41:53: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

Categories

(Core :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla22

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Recently-introduced build warning: { /mozilla/memory/mozalloc/mozalloc_oom.cpp: In function 'void mozalloc_handle_oom(size_t)': /mozilla/memory/mozalloc/mozalloc_oom.cpp:41:53: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] } This is from got a signed int loop-iterator "i" that's compared against the size_t value OOM_MSG_FIRST_DIGIT_OFFSET. We probably just want to make "i" a size_t as well (and static-assert that OOM_MSG_FIRST_DIGIT_OFFSET is greater than 0, so that the "i >= OOM_MSG_FIRST_DIGIT_OFFSET" comparison will eventually fail).
Attached patch fixSplinter Review
Attachment #725955 - Flags: review?(benjamin)
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Comment on attachment 725955 [details] [diff] [review] fix I don't think you meant to reindent the modeline, right? r=me with that reverted
Attachment #725955 - Flags: review?(benjamin) → review+
Oops -- thanks for catching that. :) Fixed that & pushed: https://hg.mozilla.org/integration/mozilla-inbound/rev/8696e0523772
Flags: in-testsuite-
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: