Bug 560393, part 2: (xpcom directory) Fix compile warning: format $f expects type $t1, but argument 2 has type $t2. r=bsmedberg

This commit is contained in:
Daniel Holbert 2010-05-17 16:36:31 -07:00
Родитель 86b537203d
Коммит 160320f2c5
6 изменённых файлов: 15 добавлений и 13 удалений

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

@ -173,7 +173,7 @@ nsNativeModuleLoader::LoadModule(nsILocalFile* aFile, nsIModule* *aResult)
fprintf(stderr, fprintf(stderr,
"nsNativeModuleLoader::LoadModule(\"%s\") - load FAILED, " "nsNativeModuleLoader::LoadModule(\"%s\") - load FAILED, "
"rv: %lx, error:\n\t%s\n", "rv: %lx, error:\n\t%s\n",
filePath.get(), rv, errorMsg); filePath.get(), (unsigned long)rv, errorMsg);
#endif #endif
return rv; return rv;

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

@ -368,7 +368,7 @@ main()
{ {
printf(">>main()\n"); printf(">>main()\n");
printf("sizeof(nsCOMPtr<IFoo>) --> %d\n", sizeof(nsCOMPtr<IFoo>)); printf("sizeof(nsCOMPtr<IFoo>) --> %u\n", unsigned(sizeof(nsCOMPtr<IFoo>)));
TestBloat_Raw_Unsafe(); TestBloat_Raw_Unsafe();
TestBloat_Smart(); TestBloat_Smart();

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

@ -93,7 +93,7 @@ EntityNode gEntities[] = {
{"macr",175} {"macr",175}
}; };
#define ENTITY_COUNT (sizeof(gEntities)/sizeof(EntityNode)) #define ENTITY_COUNT (unsigned(sizeof(gEntities)/sizeof(EntityNode)))
class EntityToUnicodeEntry : public PLDHashEntryHdr class EntityToUnicodeEntry : public PLDHashEntryHdr
{ {
@ -460,7 +460,7 @@ main(void) {
} }
printf("OK\n"); printf("OK\n");
printf("Filling hash with %d entries.\n", ENTITY_COUNT); printf("Filling hash with %u entries.\n", ENTITY_COUNT);
PRUint32 i; PRUint32 i;
for (i = 0; i < ENTITY_COUNT; ++i) { for (i = 0; i < ENTITY_COUNT; ++i) {
@ -527,7 +527,7 @@ main(void) {
} }
printf("OK\n"); printf("OK\n");
printf("Filling hash with %d entries.\n", ENTITY_COUNT); printf("Filling hash with %u entries.\n", ENTITY_COUNT);
for (i = 0; i < ENTITY_COUNT; ++i) { for (i = 0; i < ENTITY_COUNT; ++i) {
printf(" Putting entry %u...", gEntities[i].mUnicode); printf(" Putting entry %u...", gEntities[i].mUnicode);
@ -592,7 +592,7 @@ main(void) {
} }
printf("OK\n"); printf("OK\n");
printf("Filling hash with %d entries.\n", ENTITY_COUNT); printf("Filling hash with %u entries.\n", ENTITY_COUNT);
for (i = 0; i < ENTITY_COUNT; ++i) { for (i = 0; i < ENTITY_COUNT; ++i) {
printf(" Putting entry %u...", gEntities[i].mUnicode); printf(" Putting entry %u...", gEntities[i].mUnicode);
@ -661,7 +661,7 @@ main(void) {
} }
printf("OK\n"); printf("OK\n");
printf("Filling hash with %d entries.\n", ENTITY_COUNT); printf("Filling hash with %u entries.\n", ENTITY_COUNT);
for (i = 0; i < ENTITY_COUNT; ++i) { for (i = 0; i < ENTITY_COUNT; ++i) {
printf(" Putting entry %u...", gEntities[i].mUnicode); printf(" Putting entry %u...", gEntities[i].mUnicode);
@ -729,7 +729,7 @@ main(void) {
} }
printf("OK\n"); printf("OK\n");
printf("Filling hash with %d entries.\n", ENTITY_COUNT); printf("Filling hash with %u entries.\n", ENTITY_COUNT);
nsCOMArray<IFoo> fooArray; nsCOMArray<IFoo> fooArray;
@ -805,7 +805,7 @@ main(void) {
} }
printf("OK\n"); printf("OK\n");
printf("Filling hash with %d entries.\n", ENTITY_COUNT); printf("Filling hash with %u entries.\n", ENTITY_COUNT);
for (i = 0; i < ENTITY_COUNT; ++i) { for (i = 0; i < ENTITY_COUNT; ++i) {
printf(" Putting entry %u...", gEntities[i].mUnicode); printf(" Putting entry %u...", gEntities[i].mUnicode);
@ -879,7 +879,7 @@ main(void) {
} }
printf("OK\n"); printf("OK\n");
printf("Filling hash with %d entries.\n", ENTITY_COUNT); printf("Filling hash with %u entries.\n", ENTITY_COUNT);
for (i = 0; i < ENTITY_COUNT; ++i) { for (i = 0; i < ENTITY_COUNT; ++i) {
printf(" Putting entry %u...", gEntities[i].mUnicode); printf(" Putting entry %u...", gEntities[i].mUnicode);

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

@ -368,7 +368,7 @@ main()
{ {
printf(">>main()\n"); printf(">>main()\n");
printf("sizeof(nsRefPtr<Foo>) --> %d\n", sizeof(nsRefPtr<Foo>)); printf("sizeof(nsRefPtr<Foo>) --> %u\n", unsigned(sizeof(nsRefPtr<Foo>)));
TestBloat_Raw_Unsafe(); TestBloat_Raw_Unsafe();
TestBloat_Smart(); TestBloat_Smart();

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

@ -227,7 +227,8 @@ main(int argc, char **argv)
if (flen > 0) { if (flen > 0) {
size_t rv = fread(whole, 1, flen, in); size_t rv = fread(whole, 1, flen, in);
if (rv < flen) { if (rv < flen) {
fprintf(stderr, "short read (%d vs %d)! ouch!\n", rv, flen); fprintf(stderr, "short read (%u vs %u)! ouch!\n",
(unsigned int)rv, (unsigned int)flen);
goto out; goto out;
} }
if (ferror(in) != 0 || fclose(in) != 0) if (ferror(in) != 0 || fclose(in) != 0)

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

@ -236,7 +236,8 @@ main(int argc, char **argv)
if (flen > 0) { if (flen > 0) {
size_t rv = fread(whole, 1, flen, in); size_t rv = fread(whole, 1, flen, in);
if (rv < flen) { if (rv < flen) {
fprintf(stderr, "short read (%d vs %d)! ouch!\n", rv, flen); fprintf(stderr, "short read (%u vs %u)! ouch!\n",
(unsigned int)rv, (unsigned int)flen);
return 1; return 1;
} }
if (ferror(in) != 0 || fclose(in) != 0) { if (ferror(in) != 0 || fclose(in) != 0) {