summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2002-11-22 23:55:08 +0000
committerBjörn Stenberg <bjorn@haxx.se>2002-11-22 23:55:08 +0000
commitac88b9e5ff8bc16f93a8454e3b5e42c97c408ff0 (patch)
tree047dcec1a1d18f911d40be7de602dd43c43a5525
parentb5184d761b9c3b0fa79ba891ae148b0a44f13757 (diff)
downloadrockbox-ac88b9e5ff8bc16f93a8454e3b5e42c97c408ff0.zip
rockbox-ac88b9e5ff8bc16f93a8454e3b5e42c97c408ff0.tar.gz
rockbox-ac88b9e5ff8bc16f93a8454e3b5e42c97c408ff0.tar.bz2
rockbox-ac88b9e5ff8bc16f93a8454e3b5e42c97c408ff0.tar.xz
Fixed warnings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2876 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/drivers/ata.c6
-rw-r--r--firmware/drivers/fat.c14
2 files changed, 15 insertions, 5 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index 58349f6..9a61c2e 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -173,6 +173,12 @@ int ata_read_sectors(unsigned long start,
int count;
void* buf;
+ if ( incount > 1 )
+ DEBUGF("[Reading %d blocks: 0x%x to 0x%x]\n",
+ incount, start, start+incount-1);
+ else
+ DEBUGF("[Reading block 0x%x]\n", start);
+
last_disk_activity = current_tick;
mutex_lock(&ata_mtx);
diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c
index 6418349..907947f 100644
--- a/firmware/drivers/fat.c
+++ b/firmware/drivers/fat.c
@@ -638,6 +638,7 @@ static int flush_fat(void)
return 0;
}
+#ifdef HAVE_RTC
static void fat_time(unsigned short* date,
unsigned short* time,
unsigned short* tenth )
@@ -657,6 +658,7 @@ static void fat_time(unsigned short* date,
if (tenth)
*tenth = (tm->tm_sec & 1) * 100;
}
+#endif
static int write_long_name(struct fat_file* file,
unsigned int firstentry,
@@ -1044,7 +1046,6 @@ static int update_file_size( struct fat_file* file, int size )
unsigned int* sizeptr;
unsigned short* clusptr;
struct fat_file dir;
- unsigned short date=0, time=0;
int err;
LDEBUGF("update_file_size(cluster:%x entry:%d size:%d)\n",
@@ -1076,10 +1077,13 @@ static int update_file_size( struct fat_file* file, int size )
*sizeptr = SWAB32(size);
#ifdef HAVE_RTC
- fat_time(&date, &time, NULL);
- *(unsigned short*)(entry + FATDIR_WRTTIME) = SWAB16(time);
- *(unsigned short*)(entry + FATDIR_WRTDATE) = SWAB16(date);
- *(unsigned short*)(entry + FATDIR_LSTACCDATE) = SWAB16(date);
+ {
+ unsigned short date=0, time=0;
+ fat_time(&date, &time, NULL);
+ *(unsigned short*)(entry + FATDIR_WRTTIME) = SWAB16(time);
+ *(unsigned short*)(entry + FATDIR_WRTDATE) = SWAB16(date);
+ *(unsigned short*)(entry + FATDIR_LSTACCDATE) = SWAB16(date);
+ }
#endif
err = fat_seek( &dir, sector );