Skip to content

Commit

Permalink
more warnings fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
planetbeing committed Jul 21, 2008
1 parent 9a4a40d commit 8eeb0ca
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 9 deletions.
3 changes: 0 additions & 3 deletions dfu-util/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down
2 changes: 1 addition & 1 deletion dfu-util/sam7dfu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ipsw-patch/ibootim.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions ipsw-patch/lzssfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion ipsw-patch/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion ipsw-patch/outputstate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 8eeb0ca

Please sign in to comment.