Fix compiler warnings in js/src (no bug,r=themaid)

--HG--
extra : rebase_source : bce94f0cc69b5eb7e5289688d720c6f65e742ac9
This commit is contained in:
Luke Wagner 2012-08-15 18:23:05 -07:00
parent 8b79cc302d
commit 8f5728f325
2 changed files with 7 additions and 7 deletions

View File

@ -44,8 +44,8 @@ createMyObject(JSContext* context, unsigned argc, jsval *vp)
static JSFunctionSpec s_functions[] =
{
{ "createMyObject", createMyObject, 0 },
{ 0,0,0,0 }
JS_FN("createMyObject", createMyObject, 0, 0),
JS_FS_END
};
BEGIN_TEST(testOps_bug559006)

View File

@ -229,14 +229,14 @@ SPSProfiler::ipToPC(JSScript *script, size_t ip)
JMScriptInfo *info = ptr->value;
/* First check if this ip is in any of the ICs compiled for the script */
for (int i = 0; i < info->ics.length(); i++) {
for (unsigned i = 0; i < info->ics.length(); i++) {
ICInfo &ic = info->ics[i];
if (ic.base <= ip && ip < ic.base + ic.size)
return ic.pc;
}
/* Otherwise if it's not in any of the chunks, then we can't find it */
for (int i = 0; i < info->chunks.length(); i++) {
for (unsigned i = 0; i < info->chunks.length(); i++) {
jsbytecode *pc = info->chunks[i].convert(script, ip);
if (pc != NULL)
return pc;
@ -296,7 +296,7 @@ SPSProfiler::registerMJITCode(mjit::JITChunk *chunk,
* the corresponding script for that frame.
*/
mjit::PCLengthEntry *pcLengths = chunk->pcLengths + outerFrame->script->length;
for (int i = 0; i < chunk->nInlineFrames; i++) {
for (unsigned i = 0; i < chunk->nInlineFrames; i++) {
JMChunkInfo *child = registerScript(inlineFrames[i], pcLengths, chunk);
if (!child)
return false;
@ -361,7 +361,7 @@ SPSProfiler::discardMJITCode(mjit::JITScript *jscr,
return;
unregisterScript(jscr->script, chunk);
for (int i = 0; i < chunk->nInlineFrames; i++)
for (unsigned i = 0; i < chunk->nInlineFrames; i++)
unregisterScript(chunk->inlineFrames()[i].fun->script(), chunk);
}
@ -372,7 +372,7 @@ SPSProfiler::unregisterScript(JSScript *script, mjit::JITChunk *chunk)
if (!ptr)
return;
JMScriptInfo *info = ptr->value;
for (int i = 0; i < info->chunks.length(); i++) {
for (unsigned i = 0; i < info->chunks.length(); i++) {
if (info->chunks[i].chunk == chunk) {
info->chunks.erase(&info->chunks[i]);
break;