Fixed printf() format related warnings.

This commit is contained in:
Ingo Weinhold
2011-11-25 06:17:29 +01:00
parent dad288f954
commit c3093f6d0f
2 changed files with 16 additions and 13 deletions
+13 -11
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2009, Ingo Weinhold, [email protected].
* Copyright 2009-2011, Ingo Weinhold, [email protected].
* Copyright 2011, Oliver Tappe <[email protected]>
* Distributed under the terms of the MIT License.
*/
@@ -11,6 +11,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <Entry.h>
@@ -53,11 +54,11 @@ public:
return;
printf("----- TOC Info -----------------------------------\n");
printf("cached strings size: %10llu (uncompressed)\n",
printf("cached strings size: %10" B_PRIu64 " (uncompressed)\n",
uncompressedStringsSize);
printf("TOC main size: %10llu (uncompressed)\n",
printf("TOC main size: %10" B_PRIu64 " (uncompressed)\n",
uncompressedMainSize);
printf("total TOC size: %10llu (uncompressed)\n",
printf("total TOC size: %10" B_PRIu64 " (uncompressed)\n",
uncompressedTOCSize);
}
@@ -68,8 +69,8 @@ public:
return;
printf("----- Package Attribute Info ---------------------\n");
printf("string count: %10lu\n", stringCount);
printf("package attributes size: %10lu (uncompressed)\n",
printf("string count: %10" B_PRIu32 "\n", stringCount);
printf("package attributes size: %10" B_PRIu32 " (uncompressed)\n",
uncompressedSize);
}
@@ -80,11 +81,12 @@ public:
return;
printf("----- Package Info ----------------\n");
printf("header size: %10lu\n", headerSize);
printf("heap size: %10llu\n", heapSize);
printf("TOC size: %10llu\n", tocSize);
printf("package attributes size: %10lu\n", packageAttributesSize);
printf("total size: %10llu\n", totalSize);
printf("header size: %10" B_PRIu32 "\n", headerSize);
printf("heap size: %10" B_PRIu64 "\n", heapSize);
printf("TOC size: %10" B_PRIu64 "\n", tocSize);
printf("package attributes size: %10" B_PRIu32 "\n",
packageAttributesSize);
printf("total size: %10" B_PRIu64 "\n", totalSize);
printf("-----------------------------------\n");
}
+3 -2
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2009, Ingo Weinhold, [email protected].
* Copyright 2009-2011, Ingo Weinhold, [email protected].
* Distributed under the terms of the MIT License.
*/
@@ -10,6 +10,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <package/hpkg/PackageContentHandler.h>
#include <package/hpkg/PackageEntry.h>
@@ -96,7 +97,7 @@ struct PackageContentListHandler : BPackageContentHandler {
printf(" '%c%c%c%c'", int(type >> 24), int((type >> 16) & 0xff),
int((type >> 8) & 0xff), int(type & 0xff));
} else
printf(" %#lx", type);
printf(" %#" B_PRIx32, type);
printf(">\n");
return B_OK;