Closed Bug 835915 Opened 7 years ago Closed 7 years ago

JSCustomObjectBuilder.cpp:211:45: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

Categories

(Core :: Gecko Profiler, defect)

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Build warning:
{
16:54.79 /scratch/work/builds/mozilla-inbound/mozilla/tools/profiler/JSCustomObjectBuilder.cpp: In function 'std::ostream& operator<<(std::ostream&, JSCustomArray*)':
16:54.79 Warning: -Wsign-compare in /scratch/work/builds/mozilla-inbound/mozilla/tools/profiler/JSCustomObjectBuilder.cpp: comparison between signed and unsigned integer expressions
16:54.79 /scratch/work/builds/mozilla-inbound/mozilla/tools/profiler/JSCustomObjectBuilder.cpp:211:45: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
}

Trivial fix; just need to change loop iterator variable to be unsigned instead of signed. (since it's iterating up to a nsTArray's Length() which is unsigned)
Attached patch fixSplinter Review
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #707717 - Flags: review?(bgirard)
Attachment #707717 - Flags: review?(bgirard) → review+
https://hg.mozilla.org/mozilla-central/rev/4b6aababc842
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.