From 9a4a40d7c18b1e9e92a804ecfce6f03da6a29ba1 Mon Sep 17 00:00:00 2001 From: planetbeing Date: Mon, 21 Jul 2008 01:37:53 -0400 Subject: [PATCH] warnings fixes --- dfu-util/main.c | 3 +-- hfs/hfslib.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dfu-util/main.c b/dfu-util/main.c index fc33a355..70f85b8e 100644 --- a/dfu-util/main.c +++ b/dfu-util/main.c @@ -327,7 +327,6 @@ int download(AbstractFile* file, unsigned int transfer_size, int final_reset) struct dfu_status status; struct usb_dfu_func_descriptor func_dfu; char *alt_name = NULL; /* query alt name if non-NULL */ - int page_size = getpagesize(); int ret; printf("dfu-util - (C) 2007 by OpenMoko Inc. Hacked by the iPhone Dev Team\n" @@ -480,7 +479,7 @@ int download(AbstractFile* file, unsigned int transfer_size, int final_reset) if (ret < 0) { fprintf(stderr, "Error obtaining DFU functional " "descriptor: %s\n", usb_strerror()); - transfer_size = page_size; + transfer_size = 0x800; } else { func_dfu.wTransferSize = LE2CPU16(func_dfu.wTransferSize); transfer_size = func_dfu.wTransferSize; diff --git a/hfs/hfslib.c b/hfs/hfslib.c index ab246a36..fee5af31 100644 --- a/hfs/hfslib.c +++ b/hfs/hfslib.c @@ -467,7 +467,7 @@ int copyAcrossVolumes(Volume* volume1, Volume* volume2, char* path1, char* path2 printf("retrieving... "); fflush(stdout); get_hfs(volume1, path1, tmpFile); tmpFile->seek(tmpFile, 0); - printf("writing (%ld)... ", tmpFile->getLength(tmpFile)); fflush(stdout); + printf("writing (%ld)... ", (long) tmpFile->getLength(tmpFile)); fflush(stdout); ret = add_hfs(volume2, tmpFile, path2); printf("done\n");