Bug 552329: Fix compile warnings in xpcshell test TestOOM.cpp. r=dougt, test-only change on CLOSED TREE to see if tinderbox still wants to be red

This commit is contained in:
Daniel Holbert 2010-03-16 10:42:51 -07:00
Родитель a393bc1d89
Коммит 5eaa5410d9
1 изменённых файлов: 7 добавлений и 6 удалений

Просмотреть файл

@ -62,6 +62,7 @@ int main(int argc, char **argv)
// the predicate should work with out having to rely on
// that.
void *big_alloc = malloc(1024 * 1024 * 16);
(void)big_alloc; // Tell compiler we're not using big_alloc, to fix warning
const int highpower = 500000;
@ -77,10 +78,10 @@ int main(int argc, char **argv)
// You have to touch the buffer
if (!buffers[i])
printf("Could not allocate a buffer of size %ld\n", s);
printf("Could not allocate a buffer of size %lu\n", (unsigned long)s);
else
{
for (int j=0; j<s; j++)
for (size_t j=0; j<s; j++)
buffers[i][j] = 'a';
}
@ -89,10 +90,10 @@ int main(int argc, char **argv)
PRIntervalTime cost = PR_IntervalNow() - start;
printf("Total Allocated: %ld. \tLow Memory now? %s\t Took (%d)\n",
s*i,
lowMem ? "Yes" : "No",
PR_IntervalToMilliseconds(cost));
printf("Total Allocated: %lu. \tLow Memory now? %s\t Took (%d)\n",
(unsigned long)s*i,
lowMem ? "Yes" : "No",
PR_IntervalToMilliseconds(cost));
if (lowMem)
break;