From c3093f6d0f6ed5683bc6fabd4a94848a6aaf0090 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Thu, 16 Jun 2011 19:46:18 +0200 Subject: [PATCH] Fixed printf() format related warnings. --- src/bin/package/command_create.cpp | 24 +++++++++++++----------- src/bin/package/command_list.cpp | 5 +++-- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/bin/package/command_create.cpp b/src/bin/package/command_create.cpp index 5e901e99b9..66fbb6c28b 100644 --- a/src/bin/package/command_create.cpp +++ b/src/bin/package/command_create.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2011, Ingo Weinhold, ingo_weinhold@gmx.de. * Copyright 2011, Oliver Tappe * Distributed under the terms of the MIT License. */ @@ -11,6 +11,7 @@ #include #include #include +#include #include @@ -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"); } diff --git a/src/bin/package/command_list.cpp b/src/bin/package/command_list.cpp index 0c2671d43a..c7ba11284b 100644 --- a/src/bin/package/command_list.cpp +++ b/src/bin/package/command_list.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2011, Ingo Weinhold, ingo_weinhold@gmx.de. * Distributed under the terms of the MIT License. */ @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -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;