Fix compile warnings (set-but-not-used) on big endian targets

Change-Id: Ia433122d6c0af68a47d2f4a531a0787a9d3d9f72
This commit is contained in:
Solomon Peachy 2020-10-13 13:20:56 -04:00
parent 4a3d046545
commit ca326896d0
2 changed files with 21 additions and 17 deletions

View file

@ -491,7 +491,6 @@ static int get_clip(long id, struct queue_entry *q)
static bool load_index_table(int fd, const struct voicefile_header *hdr)
{
ssize_t ret;
struct clip_entry *buf;
if (index_handle > 0) /* nothing to do? */
return true;
@ -505,14 +504,15 @@ static bool load_index_table(int fd, const struct voicefile_header *hdr)
if (ret == alloc_size)
{
#ifdef ROCKBOX_LITTLE_ENDIAN
struct clip_entry *buf;
buf = core_get_data(index_handle);
for (int i = 0; i < hdr->id1_max + hdr->id2_max; i++)
{
#ifdef ROCKBOX_LITTLE_ENDIAN
/* doesn't yield() */
structec_convert(&buf[i], "ll", 1, true);
#endif
}
#endif
}
else
index_handle = core_free(index_handle);