diff options
| author | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-10-01 19:45:51 +0000 |
|---|---|---|
| committer | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-10-01 19:45:51 +0000 |
| commit | 85c91a3b8e528a3016819f60f1303906b416692f (patch) | |
| tree | 8947ac67a50d24f7ef17ec528f6233edaf790720 | |
| parent | b0617f15c2db44152eb47852df8d5043305f425f (diff) | |
| download | rockbox-85c91a3b8e528a3016819f60f1303906b416692f.zip rockbox-85c91a3b8e528a3016819f60f1303906b416692f.tar.gz rockbox-85c91a3b8e528a3016819f60f1303906b416692f.tar.bz2 rockbox-85c91a3b8e528a3016819f60f1303906b416692f.tar.xz | |
void* can't be offset, gcc should not allows this
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5147 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | firmware/common/file.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/firmware/common/file.c b/firmware/common/file.c index c09a7fe..623e898 100644 --- a/firmware/common/file.c +++ b/firmware/common/file.c @@ -468,7 +468,8 @@ static int readwrite(int fd, void* buf, int 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, buf+nread, write ); + int rc = fat_readwrite(&(file->fatfile), sectors, + (unsigned char*)buf+nread, write ); if ( rc < 0 ) { DEBUGF("Failed read/writing %d sectors\n",sectors); errno = EIO; @@ -526,7 +527,7 @@ static int readwrite(int fd, void* buf, int count, bool write) return nread ? nread : rc * 10 - 6; } } - memcpy( file->cache, buf + nread, count ); + memcpy( file->cache, (unsigned char*)buf + nread, count ); file->dirty = true; } else { @@ -538,7 +539,7 @@ static int readwrite(int fd, void* buf, int count, bool write) file->cacheoffset = -1; return nread ? nread : rc * 10 - 7; } - memcpy( buf + nread, file->cache, count ); + memcpy( (unsigned char*)buf + nread, file->cache, count ); } nread += count; |