summaryrefslogtreecommitdiffstats
path: root/rbutil/ipodpatcher
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2007-07-29 20:43:42 +0000
committerDave Chapman <dave@dchapman.com>2007-07-29 20:43:42 +0000
commit3b1119bf27ec945a54e1d60279fc542629885c64 (patch)
treec54ec3792dd865befcc4d5f6dc3160da606e8c63 /rbutil/ipodpatcher
parent6139eeda4f81e22b6be22498355645b656911587 (diff)
downloadrockbox-3b1119bf27ec945a54e1d60279fc542629885c64.tar.gz
rockbox-3b1119bf27ec945a54e1d60279fc542629885c64.tar.bz2
rockbox-3b1119bf27ec945a54e1d60279fc542629885c64.zip
Fix some cosmetic bugs in error messages. These generated warnings when compiling ipodpatcher with -O2.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14065 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/ipodpatcher')
-rw-r--r--rbutil/ipodpatcher/ipodpatcher.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/rbutil/ipodpatcher/ipodpatcher.c b/rbutil/ipodpatcher/ipodpatcher.c
index 567c5b9cce..e43fc8d156 100644
--- a/rbutil/ipodpatcher/ipodpatcher.c
+++ b/rbutil/ipodpatcher/ipodpatcher.c
@@ -390,7 +390,6 @@ int diskmove(struct ipod_t* ipod, int delta)
int src_end;
int bytesleft;
int chunksize;
- int i;
int n;
src_start = ipod->ipod_directory[1].devOffset + ipod->sector_size;
@@ -437,7 +436,7 @@ int diskmove(struct ipod_t* ipod, int delta)
if (n < chunksize) {
fprintf(stderr,"[ERR] Short read - requested %d bytes, received %d\n",
- i,n);
+ chunksize,n);
return -1;
}
@@ -453,7 +452,7 @@ int diskmove(struct ipod_t* ipod, int delta)
if (n < chunksize) {
fprintf(stderr,"[ERR] Short write - requested %d bytes, received %d\n"
- ,i,n);
+ ,chunksize,n);
return -1;
}
@@ -602,7 +601,7 @@ int add_bootloader(struct ipod_t* ipod, char* filename, int type)
if (n < entryOffset) {
fprintf(stderr,"[ERR] Short read - requested %d bytes, received %d\n"
- ,i,n);
+ ,entryOffset,n);
return -1;
}
@@ -637,7 +636,7 @@ int add_bootloader(struct ipod_t* ipod, char* filename, int type)
if (n < (entryOffset+paddedlength)) {
fprintf(stderr,"[ERR] Short read - requested %d bytes, received %d\n"
- ,i,n);
+ ,entryOffset+paddedlength,n);
return -1;
}
@@ -882,7 +881,7 @@ int write_firmware(struct ipod_t* ipod, char* filename, int type)
if (n < newsize) {
fprintf(stderr,"[ERR] Short write - requested %d bytes, received %d\n"
- ,i,n);
+ ,newsize,n);
return -1;
}
fprintf(stderr,"[INFO] Wrote %d bytes to firmware partition\n",n);