From 50798120310938cd61d19fdb943a3c654f846a9f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 26 Apr 2007 10:29:41 +0000 Subject: avoid declaring shadow 'rc' variables (-Wshadow!) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13270 a1c6a512-1295-4272-9138-f99709370657 --- firmware/common/file.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'firmware') 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) if (offs + headbytes == SECTOR_SIZE) { if (file->dirty) { - int rc = flush_cache(fd); + rc = flush_cache(fd); if ( rc < 0 ) { errno = EIO; return rc * 10 - 2; @@ -524,7 +524,7 @@ static int readwrite(int fd, void* buf, long count, bool write) /* read/write whole sectors right into/from the supplied buffer */ sectors = count / SECTOR_SIZE; if ( sectors ) { - int rc = fat_readwrite(&(file->fatfile), sectors, + rc = fat_readwrite(&(file->fatfile), sectors, (unsigned char*)buf+nread, write ); if ( rc < 0 ) { DEBUGF("Failed read/writing %ld sectors\n",sectors); @@ -561,7 +561,6 @@ static int readwrite(int fd, void* buf, long count, bool write) if (write) { if ( file->fileoffset + nread < file->size ) { /* sector is only partially filled. copy-back from disk */ - int rc; LDEBUGF("Copy-back tail cache\n"); rc = fat_readwrite(&(file->fatfile), 1, file->cache, false ); if ( rc < 0 ) { -- cgit v1.2.3