mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-10-09 23:53:28 -04:00
imxtools: Fix several build warnings
Change-Id: Idebf0445d3e861ff27e152730c5bed64c2e4489b
This commit is contained in:
parent
db0d7649e0
commit
3403e3cfb9
3 changed files with 5 additions and 3 deletions
|
|
@ -31,6 +31,7 @@
|
||||||
|
|
||||||
const char crypto_key[16] = "SanDiskSlotRadi";
|
const char crypto_key[16] = "SanDiskSlotRadi";
|
||||||
|
|
||||||
|
#if 0
|
||||||
static void rsrc_crypt(void *buf, int size)
|
static void rsrc_crypt(void *buf, int size)
|
||||||
{
|
{
|
||||||
if(size % 16)
|
if(size % 16)
|
||||||
|
|
@ -42,6 +43,7 @@ static void rsrc_crypt(void *buf, int size)
|
||||||
p[j] ^= crypto_key[j];
|
p[j] ^= crypto_key[j];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
enum rsrc_error_t rsrc_write_file(struct rsrc_file_t *rsrc, const char *filename)
|
enum rsrc_error_t rsrc_write_file(struct rsrc_file_t *rsrc, const char *filename)
|
||||||
{
|
{
|
||||||
|
|
@ -252,4 +254,3 @@ void rsrc_dump(struct rsrc_file_t *file, void *u, rsrc_color_printf cprintf)
|
||||||
#undef printf
|
#undef printf
|
||||||
#undef print_hex
|
#undef print_hex
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,9 @@
|
||||||
#define PAD_TO_BOUNDARY(x) (((x) + 0x1ff) & ~0x1ff)
|
#define PAD_TO_BOUNDARY(x) (((x) + 0x1ff) & ~0x1ff)
|
||||||
|
|
||||||
/* If you find a firmware that breaks the known format ^^ */
|
/* If you find a firmware that breaks the known format ^^ */
|
||||||
|
#ifndef assert
|
||||||
#define assert(a) do { if(!(a)) { fprintf(stderr,"Assertion \"%s\" failed in %s() line %d!\n\nPlease send us your firmware!\n",#a,__func__,__LINE__); exit(1); } } while(0)
|
#define assert(a) do { if(!(a)) { fprintf(stderr,"Assertion \"%s\" failed in %s() line %d!\n\nPlease send us your firmware!\n",#a,__func__,__LINE__); exit(1); } } while(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define crypto_cbc(...) \
|
#define crypto_cbc(...) \
|
||||||
do { int ret = crypto_cbc(__VA_ARGS__); \
|
do { int ret = crypto_cbc(__VA_ARGS__); \
|
||||||
|
|
@ -198,4 +200,3 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -488,11 +488,11 @@ enum sb_error_t sb_write_file(struct sb_file_t *sb, const char *filename, void *
|
||||||
|
|
||||||
if(buf_p - buf != sb_hdr.image_size * BLOCK_SIZE)
|
if(buf_p - buf != sb_hdr.image_size * BLOCK_SIZE)
|
||||||
{
|
{
|
||||||
free(buf);
|
|
||||||
printf(GREY, "Internal error: SB image buffer was not entirely filled !\n");
|
printf(GREY, "Internal error: SB image buffer was not entirely filled !\n");
|
||||||
printf(GREY, "Internal error: expected %u blocks, got %u\n",
|
printf(GREY, "Internal error: expected %u blocks, got %u\n",
|
||||||
(buf_p - buf) / BLOCK_SIZE, sb_hdr.image_size);
|
(buf_p - buf) / BLOCK_SIZE, sb_hdr.image_size);
|
||||||
cprintf(u, true, GREY, "Internal error\n");
|
cprintf(u, true, GREY, "Internal error\n");
|
||||||
|
free(buf);
|
||||||
return SB_ERROR;
|
return SB_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue