mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-10-10 08:03:04 -04:00
utils: Fix a small pile of warnings
Change-Id: Idf95fc0a6ce94ebb2282bc3b017bc7ba8aeb42fc
This commit is contained in:
parent
3403e3cfb9
commit
0fc352da0f
4 changed files with 12 additions and 21 deletions
|
|
@ -890,7 +890,7 @@ static void dfuapi_destroy(struct dfuDev *dfuh)
|
||||||
|
|
||||||
static struct dfuDev *dfuapi_create(void)
|
static struct dfuDev *dfuapi_create(void)
|
||||||
{
|
{
|
||||||
return calloc(sizeof(struct dfuDev), 1);
|
return calloc(1, sizeof(struct dfuDev));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,7 @@ static int g_nvp_node = -1;
|
||||||
|
|
||||||
#define errorf(...) do { cprintf(GREY, __VA_ARGS__); return __LINE__; } while(0)
|
#define errorf(...) do { cprintf(GREY, __VA_ARGS__); return __LINE__; } while(0)
|
||||||
|
|
||||||
|
#if 0
|
||||||
static void print_hex(void *p, int size, int unit)
|
static void print_hex(void *p, int size, int unit)
|
||||||
{
|
{
|
||||||
uint8_t *p8 = p;
|
uint8_t *p8 = p;
|
||||||
|
|
@ -63,6 +64,7 @@ static void print_hex(void *p, int size, int unit)
|
||||||
printf(" %08x", *p32);
|
printf(" %08x", *p32);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#define SECTOR 512u
|
#define SECTOR 512u
|
||||||
#define EMMC_MINIBOOT_START 0
|
#define EMMC_MINIBOOT_START 0
|
||||||
|
|
|
||||||
|
|
@ -90,13 +90,7 @@ static void init_keys(const char* passwd,unsigned long* pkeys,const z_crc_t FAR
|
||||||
# define ZCR_SEED2 3141592654UL /* use PI as default pattern */
|
# define ZCR_SEED2 3141592654UL /* use PI as default pattern */
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
static int crypthead(passwd, buf, bufSize, pkeys, pcrc_32_tab, crcForCrypting)
|
static int crypthead(const char *passwd, unsigned char *buf, int bufSize, unsigned long *pkeys, const z_crc_t FAR *pcrc_32_tab, unsigned long crcForCrypting)
|
||||||
const char *passwd; /* password string */
|
|
||||||
unsigned char *buf; /* where to write header */
|
|
||||||
int bufSize;
|
|
||||||
unsigned long* pkeys;
|
|
||||||
const z_crc_t FAR * pcrc_32_tab;
|
|
||||||
unsigned long crcForCrypting;
|
|
||||||
{
|
{
|
||||||
int n; /* index in random header */
|
int n; /* index in random header */
|
||||||
int t; /* temporary */
|
int t; /* temporary */
|
||||||
|
|
|
||||||
|
|
@ -144,11 +144,7 @@ int sansa_read_partinfo(struct sansa_t* sansa, int silent)
|
||||||
|
|
||||||
/* Return the first occurrence of NEEDLE in HAYSTACK. */
|
/* Return the first occurrence of NEEDLE in HAYSTACK. */
|
||||||
static void *
|
static void *
|
||||||
sansa_memmem (haystack, haystack_len, needle, needle_len)
|
sansa_memmem (const void *haystack, size_t haystack_len, const void *needle, size_t needle_len)
|
||||||
const void *haystack;
|
|
||||||
size_t haystack_len;
|
|
||||||
const void *needle;
|
|
||||||
size_t needle_len;
|
|
||||||
{
|
{
|
||||||
const char *begin;
|
const char *begin;
|
||||||
const char *const last_possible
|
const char *const last_possible
|
||||||
|
|
@ -971,4 +967,3 @@ int sansa_update_ppbl(struct sansa_t* sansa, const char* filename)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue