diff options
author | Daniel Stenberg <daniel@haxx.se> | 2007-04-26 10:29:41 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2007-04-26 10:29:41 +0000 |
commit | 50798120310938cd61d19fdb943a3c654f846a9f (patch) | |
tree | 9e99aae71ac3c4ff40cdd3e81ce61e8a8a02b2a4 /firmware/common | |
parent | 52ba1c614dfe92e734747f74237e8840912607e8 (diff) | |
download | rockbox-50798120310938cd61d19fdb943a3c654f846a9f.tar.gz rockbox-50798120310938cd61d19fdb943a3c654f846a9f.zip |
avoid declaring shadow 'rc' variables (-Wshadow!)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13270 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/common')
-rw-r--r-- | firmware/common/file.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/firmware/common/file.c b/firmware/common/file.c index 830a7eef8a..bc57d556b3 100644 --- a/firmware/common/file.c +++ b/firmware/common/file.c | |||
@@ -501,7 +501,7 @@ static int readwrite(int fd, void* buf, long count, bool write) | |||
501 | 501 | ||
502 | if (offs + headbytes == SECTOR_SIZE) { | 502 | if (offs + headbytes == SECTOR_SIZE) { |
503 | if (file->dirty) { | 503 | if (file->dirty) { |
504 | int rc = flush_cache(fd); | 504 | rc = flush_cache(fd); |
505 | if ( rc < 0 ) { | 505 | if ( rc < 0 ) { |
506 | errno = EIO; | 506 | errno = EIO; |
507 | return rc * 10 - 2; | 507 | return rc * 10 - 2; |
@@ -524,7 +524,7 @@ static int readwrite(int fd, void* buf, long count, bool write) | |||
524 | /* read/write whole sectors right into/from the supplied buffer */ | 524 | /* read/write whole sectors right into/from the supplied buffer */ |
525 | sectors = count / SECTOR_SIZE; | 525 | sectors = count / SECTOR_SIZE; |
526 | if ( sectors ) { | 526 | if ( sectors ) { |
527 | int rc = fat_readwrite(&(file->fatfile), sectors, | 527 | rc = fat_readwrite(&(file->fatfile), sectors, |
528 | (unsigned char*)buf+nread, write ); | 528 | (unsigned char*)buf+nread, write ); |
529 | if ( rc < 0 ) { | 529 | if ( rc < 0 ) { |
530 | DEBUGF("Failed read/writing %ld sectors\n",sectors); | 530 | DEBUGF("Failed read/writing %ld sectors\n",sectors); |
@@ -561,7 +561,6 @@ static int readwrite(int fd, void* buf, long count, bool write) | |||
561 | if (write) { | 561 | if (write) { |
562 | if ( file->fileoffset + nread < file->size ) { | 562 | if ( file->fileoffset + nread < file->size ) { |
563 | /* sector is only partially filled. copy-back from disk */ | 563 | /* sector is only partially filled. copy-back from disk */ |
564 | int rc; | ||
565 | LDEBUGF("Copy-back tail cache\n"); | 564 | LDEBUGF("Copy-back tail cache\n"); |
566 | rc = fat_readwrite(&(file->fatfile), 1, file->cache, false ); | 565 | rc = fat_readwrite(&(file->fatfile), 1, file->cache, false ); |
567 | if ( rc < 0 ) { | 566 | if ( rc < 0 ) { |