From 8eeb0caa2e143fdc1ac2df4b9fe77362aa428cbe Mon Sep 17 00:00:00 2001 From: planetbeing Date: Mon, 21 Jul 2008 01:45:05 -0400 Subject: [PATCH] more warnings fixes --- dfu-util/main.c | 3 --- dfu-util/sam7dfu.c | 2 +- ipsw-patch/ibootim.c | 2 +- ipsw-patch/lzssfile.c | 2 -- ipsw-patch/main.c | 2 +- ipsw-patch/outputstate.c | 2 +- 6 files changed, 4 insertions(+), 9 deletions(-) diff --git a/dfu-util/main.c b/dfu-util/main.c index 70f85b8e..99cd8672 100644 --- a/dfu-util/main.c +++ b/dfu-util/main.c @@ -486,9 +486,6 @@ int download(AbstractFile* file, unsigned int transfer_size, int final_reset) } } - if (transfer_size > page_size) - transfer_size = page_size; - printf("Transfer Size = 0x%04x\n", transfer_size); if (DFU_STATUS_OK != status.bStatus ) { diff --git a/dfu-util/sam7dfu.c b/dfu-util/sam7dfu.c index a0e82899..a7235125 100644 --- a/dfu-util/sam7dfu.c +++ b/dfu-util/sam7dfu.c @@ -147,7 +147,7 @@ int sam7dfu_do_dnload(struct usb_dev_handle *usb_handle, int interface, bytes_per_hash = fileSize / PROGRESS_BAR_WIDTH; if (bytes_per_hash == 0) bytes_per_hash = 1; - printf("bytes_per_hash=%u, fileSize=%u\n", bytes_per_hash, fileSize); + printf("bytes_per_hash=%u, fileSize=%lu\n", bytes_per_hash, (unsigned long) fileSize); #if 0 read(fd, DFU_HDR); #endif diff --git a/ipsw-patch/ibootim.c b/ipsw-patch/ibootim.c index 615efdec..c3b7f277 100644 --- a/ipsw-patch/ibootim.c +++ b/ipsw-patch/ibootim.c @@ -127,7 +127,7 @@ AbstractFile* createAbstractFileFromIBootIM(AbstractFile* file) { int length = decompress_lzss(info->buffer, compressed, info->compLength); if(length > info->length) { - fprintf(stderr, "createAbstractFileFromIBootIM: decompression error, length == %d (%d + %d), should be == %d (%d x %d x %d)\n", length, info->compLength, sizeof(info->header), info->length, info->header.width, info->header.height, depth); + fprintf(stderr, "createAbstractFileFromIBootIM: decompression error\n"); free(compressed); free(info); return NULL; diff --git a/ipsw-patch/lzssfile.c b/ipsw-patch/lzssfile.c index 39a48906..c72c2210 100644 --- a/ipsw-patch/lzssfile.c +++ b/ipsw-patch/lzssfile.c @@ -64,8 +64,6 @@ void closeComp(AbstractFile* file) { info->file->seek(info->file, sizeof(info->header)); info->file->write(info->file, compressed, info->header.length_compressed); - printf("lzss: %d %d %x %x %x\n", info->header.length_compressed, info->header.length_uncompressed, compressed[info->header.length_compressed - 2], compressed[info->header.length_compressed - 1], info->header.length_compressed + sizeof(info->header)); - free(compressed); flipCompHeader(&(info->header)); diff --git a/ipsw-patch/main.c b/ipsw-patch/main.c index 4617128e..b99d8bc8 100644 --- a/ipsw-patch/main.c +++ b/ipsw-patch/main.c @@ -278,7 +278,7 @@ int main(int argc, char* argv[]) { rootFS = IOFuncFromAbstractFile(createAbstractFileFromMemoryFile((void**)&buffer, &rootSize)); rootVolume = openVolume(rootFS); - printf("Growing root: %d\n", rootSize); fflush(stdout); + printf("Growing root: %ld\n", (long) rootSize); fflush(stdout); grow_hfs(rootVolume, rootSize); firmwarePatches = (Dictionary*)getValueByKey(info, "FilesystemPatches"); diff --git a/ipsw-patch/outputstate.c b/ipsw-patch/outputstate.c index ecdbdc7f..0564fa13 100644 --- a/ipsw-patch/outputstate.c +++ b/ipsw-patch/outputstate.c @@ -141,7 +141,7 @@ void writeOutput(OutputState** state, char* ipsw) { while(next != NULL) { curFile = next; next = next->next; - printf("packing: %s (%d)\n", curFile->fileName, curFile->bufferSize); fflush(stdout); + printf("packing: %s (%ld)\n", curFile->fileName, (long) curFile->bufferSize); fflush(stdout); if(curFile->bufferSize > 0) { ASSERT(zipOpenNewFileInZip(zip, curFile->fileName, &info, NULL, 0, NULL, 0, NULL, Z_DEFLATED, Z_DEFAULT_COMPRESSION) == 0, "error adding to zip");