Permalink
Browse files

warnings clean-up for release gear up

  • Loading branch information...
1 parent 8eeb0ca commit 1ff50c89f83ab08d608c8d751ac40db44ed135be @planetbeing committed Jul 21, 2008
Showing with 13 additions and 10 deletions.
  1. +3 −2 dmg/io.c
  2. +3 −2 hdutil/hdutil.c
  3. +4 −2 hfs/hfs.c
  4. +3 −2 hfs/hfslib.c
  5. +0 −2 ipsw-patch/ibootim.c
View
@@ -4,6 +4,7 @@
#include <zlib.h>
#include <dmg/dmg.h>
+#include <inttypes.h>
#define SECTORS_AT_A_TIME 0x200
@@ -71,7 +72,7 @@ BLKXTable* insertBLKX(AbstractFile* out, AbstractFile* in, uint32_t firstSectorN
strm.zfree = Z_NULL;
strm.opaque = Z_NULL;
- printf("run %d: sectors=%lld, left=%d\n", curRun, blkx->runs[curRun].sectorCount, numSectors);
+ printf("run %d: sectors=%" PRId64 ", left=%d\n", curRun, blkx->runs[curRun].sectorCount, numSectors);
ASSERT(deflateInit(&strm, Z_DEFAULT_COMPRESSION) == Z_OK, "deflateInit");
@@ -176,7 +177,7 @@ void extractBLKX(AbstractFile* in, AbstractFile* out, BLKXTable* blkx) {
continue;
}
- printf("run %d: sectors=%lld, length=%lld, fileOffset=0x%llx\n", i, blkx->runs[i].sectorCount, blkx->runs[i].compLength, blkx->runs[i].compOffset);
+ printf("run %d: sectors=%" PRId64 ", length=%" PRId64 ", fileOffset=0x%" PRIx64 "\n", i, blkx->runs[i].sectorCount, blkx->runs[i].compLength, blkx->runs[i].compOffset);
switch(blkx->runs[i].type) {
case BLOCK_ZLIB:
View
@@ -11,6 +11,7 @@
#include <sys/stat.h>
#include <dirent.h>
#include "hfs/hfslib.h"
+#include <inttypes.h>
char endianness;
@@ -216,11 +217,11 @@ void cmd_grow(Volume* volume, int argc, const char *argv[]) {
}
newSize = 0;
- sscanf(argv[1], "%lld", &newSize);
+ sscanf(argv[1], "%" PRId64, &newSize);
grow_hfs(volume, newSize);
- printf("grew volume: %lld\n", newSize);
+ printf("grew volume: %" PRId64 "\n", newSize);
}
void cmd_untar(Volume* volume, int argc, const char *argv[]) {
View
@@ -8,6 +8,7 @@
#include <hfs/hfslib.h>
#include "abstractfile.h"
+#include <inttypes.h>
char endianness;
@@ -16,7 +17,8 @@ void cmd_ls(Volume* volume, int argc, const char *argv[]) {
if(argc > 1)
hfs_ls(volume, argv[1]);
else
- hfs_ls(volume, "/");}
+ hfs_ls(volume, "/");
+}
void cmd_cat(Volume* volume, int argc, const char *argv[]) {
HFSPlusCatalogRecord* record;
@@ -213,7 +215,7 @@ void cmd_grow(Volume* volume, int argc, const char *argv[]) {
}
newSize = 0;
- sscanf(argv[1], "%lld", &newSize);
+ sscanf(argv[1], "%" PRId64, &newSize);
grow_hfs(volume, newSize);
View
@@ -7,6 +7,7 @@
#include <hfs/hfsplus.h>
#include "abstractfile.h"
#include <sys/stat.h>
+#include <inttypes.h>
#define BUFSIZE 1024*1024
@@ -499,7 +500,7 @@ void displayFolder(HFSCatalogNodeID folderID, Volume* volume) {
printf("%06o ", file->permissions.fileMode);
printf("%3d ", file->permissions.ownerID);
printf("%3d ", file->permissions.groupID);
- printf("%12lld ", file->dataFork.logicalSize);
+ printf("%12" PRId64 " ", file->dataFork.logicalSize);
fileTime = APPLE_TO_UNIX_TIME(file->contentModDate);
}
@@ -526,7 +527,7 @@ void displayFileLSLine(HFSPlusCatalogFile* file, const char* name) {
printf("%06o ", file->permissions.fileMode);
printf("%3d ", file->permissions.ownerID);
printf("%3d ", file->permissions.groupID);
- printf("%12lld ", file->dataFork.logicalSize);
+ printf("%12" PRId64 " ", file->dataFork.logicalSize);
fileTime = APPLE_TO_UNIX_TIME(file->contentModDate);
date = localtime(&fileTime);
if(date != NULL) {
View
@@ -119,8 +119,6 @@ AbstractFile* createAbstractFileFromIBootIM(AbstractFile* file) {
return NULL;
}
- printf("iBootIM: depth = %d, width = %d, height = %d, length = %d\n", depth, info->header.width, info->header.height, info->length);
-
info->buffer = malloc(info->length);
compressed = malloc(info->compLength);
file->read(file, compressed, info->compLength);

0 comments on commit 1ff50c8

Please sign in to comment.