forked from len0rd/rockbox
fix more yellow
Change-Id: I74bad58707d05ea167169d4315c05eb0cd1c8b7b
This commit is contained in:
parent
b94db707fb
commit
09785a8499
6 changed files with 16 additions and 6 deletions
|
@ -1521,13 +1521,16 @@ static int ata_smart_attr_to_string(
|
|||
break;
|
||||
|
||||
case RAWFMT_RAW48:
|
||||
default:
|
||||
default: {
|
||||
uint32_t tmp;
|
||||
memcpy(&tmp, w, sizeof(tmp));
|
||||
/* shows first 4 bytes of raw data as uint32 LE,
|
||||
and the ramaining 2 bytes as uint16 LE */
|
||||
len += snprintf(buf+len, size-len, "%lu", letoh32(*((uint32_t*)w)));
|
||||
len += snprintf(buf+len, size-len, "%lu", letoh32(tmp));
|
||||
if (w[2] && (len < size))
|
||||
len += snprintf(buf+len, size-len, " %u", w[2]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* ignore trailing \0 when truncated */
|
||||
if (len >= size) len = size-1;
|
||||
|
|
|
@ -460,7 +460,7 @@ void show_fatal_error(void)
|
|||
int flash_bootloader(const char *filename)
|
||||
{
|
||||
char *bootsector;
|
||||
int pos, i, len, rc;
|
||||
int pos, i, len/*, rc*/;
|
||||
unsigned long checksum, sum;
|
||||
unsigned char *p8;
|
||||
uint16_t *p16;
|
||||
|
@ -509,7 +509,7 @@ int flash_bootloader(const char *filename)
|
|||
|
||||
/* Erase the bootloader flash section. */
|
||||
for (i = BOOTLOADER_ENTRYPOINT/SEC_SIZE; i < 0x200; i++)
|
||||
rc = cfi_erase_sector(FB + (SEC_SIZE/2) * i);
|
||||
/*rc =*/ cfi_erase_sector(FB + (SEC_SIZE/2) * i);
|
||||
|
||||
pos = BOOTLOADER_ENTRYPOINT/2;
|
||||
p16 = (uint16_t *)audiobuf;
|
||||
|
|
|
@ -365,6 +365,7 @@ static void usb_handle_data_int(int ep, int dir)
|
|||
endpoints[ep].in_ack = 1;
|
||||
}
|
||||
logf("usb_handle_data_int(%d, %d) finished", ep, dir);
|
||||
void(len);
|
||||
}
|
||||
|
||||
bool usb_drv_powered(void)
|
||||
|
|
|
@ -137,9 +137,11 @@ static int button_read_device_v2(void) {
|
|||
|
||||
int button_read_device(void) {
|
||||
static bool hold_button = false;
|
||||
#ifndef BOOTLOADER
|
||||
bool hold_button_old;
|
||||
|
||||
hold_button_old = hold_button;
|
||||
#endif
|
||||
hold_button = button_hold();
|
||||
|
||||
#ifndef BOOTLOADER
|
||||
|
|
|
@ -40,10 +40,12 @@ int button_read_device(void)
|
|||
{
|
||||
int btn = BUTTON_NONE;
|
||||
static bool hold_button = false;
|
||||
#ifndef BOOTLOADER
|
||||
bool hold_button_old;
|
||||
|
||||
/* Hold */
|
||||
hold_button_old = hold_button;
|
||||
#endif
|
||||
hold_button = button_hold();
|
||||
|
||||
#ifndef BOOTLOADER
|
||||
|
|
|
@ -194,11 +194,13 @@ int button_read_device(void)
|
|||
int data = 0;
|
||||
static bool hold_button = false;
|
||||
|
||||
#ifndef BOOTLOADER
|
||||
bool hold_button_old;
|
||||
|
||||
|
||||
/* read hold buttons status */
|
||||
hold_button_old = hold_button;
|
||||
#endif
|
||||
hold_button = button_hold();
|
||||
|
||||
#ifndef BOOTLOADER
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue