Closed Bug 849980 Opened 11 years ago Closed 11 years ago

MCallOptimize.cpp:1182:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dholbert, Unassigned)

References

(Blocks 1 open bug)

Details

New build warning on mozilla-inbound:
{
js/src/ion/MCallOptimize.cpp: In member function ‘js::ion::IonBuilder::InliningStatus js::ion::IonBuilder::inlineParallelArrayTail(js::ion::CallInfo&, JS::HandleFunction, js::ion::MDefinition*, js::types::StackTypeSet*, uint32_t)’:

js/src/ion/MCallOptimize.cpp:1182:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
}

From this line of code:
> for (int32_t i = 0; i < argc; i++) {

which was added in https://hg.mozilla.org/integration/mozilla-inbound/rev/e7f298d7b17b#l13.141 for bug 829602.

Looks like the loop arg there should just be either uint32_t or size_t -- it's compared to argc, which is a uint32_t, and it's passed to the function "addArg" which takes a size_t.
No longer blocks: 829602
Blocks: 829602
No longer blocks: buildwarning
I will put in a patch
Blocks: buildwarning
Argh.  I apologize for the strange comments and dependency edits (I was confused by bugzilla's interface).  What I wanted to write is that I will incorporate a patch for these warnings directly into bug 829602 (which was backed out).
Doesn't look like Bug 829602 will get backed out again, so marking as fixed...
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.