diff options
Diffstat (limited to 'apps/database.c')
-rw-r--r-- | apps/database.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/apps/database.c b/apps/database.c index 97fb2d70cc..df069538a2 100644 --- a/apps/database.c +++ b/apps/database.c | |||
@@ -78,7 +78,7 @@ struct tagdb_header tagdbheader; | |||
78 | 78 | ||
79 | int tagdb_init(void) | 79 | int tagdb_init(void) |
80 | { | 80 | { |
81 | unsigned char* ptr = (char*)&tagdbheader.version; | 81 | unsigned char* ptr = (unsigned char*)&tagdbheader.version; |
82 | #ifdef ROCKBOX_LITTLE_ENDIAN | 82 | #ifdef ROCKBOX_LITTLE_ENDIAN |
83 | int i, *p; | 83 | int i, *p; |
84 | #endif | 84 | #endif |
@@ -94,7 +94,8 @@ int tagdb_init(void) | |||
94 | ptr[1] != 'D' || | 94 | ptr[1] != 'D' || |
95 | ptr[2] != 'B') | 95 | ptr[2] != 'B') |
96 | { | 96 | { |
97 | gui_syncsplash(HZ,true,"Not a rockbox ID3 database!"); | 97 | gui_syncsplash(HZ, true, |
98 | (unsigned char *)"Not a rockbox ID3 database!"); | ||
98 | return -1; | 99 | return -1; |
99 | } | 100 | } |
100 | #ifdef ROCKBOX_LITTLE_ENDIAN | 101 | #ifdef ROCKBOX_LITTLE_ENDIAN |
@@ -106,8 +107,9 @@ int tagdb_init(void) | |||
106 | #endif | 107 | #endif |
107 | if ( (tagdbheader.version&0xFF) != TAGDB_VERSION) | 108 | if ( (tagdbheader.version&0xFF) != TAGDB_VERSION) |
108 | { | 109 | { |
109 | gui_syncsplash(HZ,true,"Unsupported database version %d!", | 110 | gui_syncsplash(HZ, true, |
110 | tagdbheader.version&0xFF); | 111 | (unsigned char *)"Unsupported database version %d!", |
112 | tagdbheader.version&0xFF); | ||
111 | return -1; | 113 | return -1; |
112 | } | 114 | } |
113 | 115 | ||
@@ -115,7 +117,7 @@ int tagdb_init(void) | |||
115 | tagdbheader.albumstart > tagdbheader.songstart || | 117 | tagdbheader.albumstart > tagdbheader.songstart || |
116 | tagdbheader.artiststart > tagdbheader.albumstart) | 118 | tagdbheader.artiststart > tagdbheader.albumstart) |
117 | { | 119 | { |
118 | gui_syncsplash(HZ,true,"Corrupt ID3 database!"); | 120 | gui_syncsplash(HZ, true, (unsigned char *)"Corrupt ID3 database!"); |
119 | return -1; | 121 | return -1; |
120 | } | 122 | } |
121 | 123 | ||
@@ -334,7 +336,7 @@ void rundb_buffer_track(struct mp3entry *id, bool last_track) { | |||
334 | 336 | ||
335 | int rundb_init(void) | 337 | int rundb_init(void) |
336 | { | 338 | { |
337 | unsigned char* ptr = (char*)&rundbheader.version; | 339 | unsigned char* ptr = (unsigned char*)&rundbheader.version; |
338 | #ifdef ROCKBOX_LITTLE_ENDIAN | 340 | #ifdef ROCKBOX_LITTLE_ENDIAN |
339 | int i, *p; | 341 | int i, *p; |
340 | #endif | 342 | #endif |
@@ -361,7 +363,8 @@ int rundb_init(void) | |||
361 | ptr[1] != 'R' || | 363 | ptr[1] != 'R' || |
362 | ptr[2] != 'D') | 364 | ptr[2] != 'D') |
363 | { | 365 | { |
364 | gui_syncsplash(HZ,true,"Not a rockbox runtime database!"); | 366 | gui_syncsplash(HZ, true, |
367 | (unsigned char *)"Not a rockbox runtime database!"); | ||
365 | return -1; | 368 | return -1; |
366 | } | 369 | } |
367 | #ifdef ROCKBOX_LITTLE_ENDIAN | 370 | #ifdef ROCKBOX_LITTLE_ENDIAN |
@@ -373,8 +376,9 @@ int rundb_init(void) | |||
373 | #endif | 376 | #endif |
374 | if ( (rundbheader.version&0xFF) != RUNDB_VERSION) | 377 | if ( (rundbheader.version&0xFF) != RUNDB_VERSION) |
375 | { | 378 | { |
376 | gui_syncsplash(HZ,true,"Unsupported runtime database version %d!", | 379 | gui_syncsplash(HZ, true, (unsigned char *) |
377 | rundbheader.version&0xFF); | 380 | "Unsupported runtime database version %d!", |
381 | rundbheader.version&0xFF); | ||
378 | return -1; | 382 | return -1; |
379 | } | 383 | } |
380 | 384 | ||