summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-10-13 17:09:13 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-10-13 17:23:56 -0400
commit09785a8499b601abc9eac7640060c12eba962b56 (patch)
tree5ff5f1fa2e7f9927a9e45a7e1ca586bab93d7563
parentb94db707fb7a8ace5c8821ea47d85ec48ca48e26 (diff)
downloadrockbox-09785a8499b601abc9eac7640060c12eba962b56.tar.gz
rockbox-09785a8499b601abc9eac7640060c12eba962b56.tar.bz2
rockbox-09785a8499b601abc9eac7640060c12eba962b56.zip
fix more yellow
Change-Id: I74bad58707d05ea167169d4315c05eb0cd1c8b7b
-rw-r--r--apps/debug_menu.c7
-rw-r--r--apps/plugins/iriver_flash.c4
-rw-r--r--firmware/drivers/isp1583.c1
-rw-r--r--firmware/target/arm/rk27xx/hm801/button-hm801.c4
-rw-r--r--firmware/target/arm/sandisk/sansa-c200/button-c200.c2
-rw-r--r--firmware/target/coldfire/mpio/hd300/button-hd300.c4
6 files changed, 16 insertions, 6 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 44e56cdd02..7187e8135c 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -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;
diff --git a/apps/plugins/iriver_flash.c b/apps/plugins/iriver_flash.c
index 562a680a60..829b49b31c 100644
--- a/apps/plugins/iriver_flash.c
+++ b/apps/plugins/iriver_flash.c
@@ -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;
diff --git a/firmware/drivers/isp1583.c b/firmware/drivers/isp1583.c
index 80dce59731..f6168d9f28 100644
--- a/firmware/drivers/isp1583.c
+++ b/firmware/drivers/isp1583.c
@@ -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)
diff --git a/firmware/target/arm/rk27xx/hm801/button-hm801.c b/firmware/target/arm/rk27xx/hm801/button-hm801.c
index 0ac1b3b0aa..5f01a7bd14 100644
--- a/firmware/target/arm/rk27xx/hm801/button-hm801.c
+++ b/firmware/target/arm/rk27xx/hm801/button-hm801.c
@@ -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
@@ -147,7 +149,7 @@ int button_read_device(void) {
backlight_hold_changed(hold_button);
}
#endif
-
+
if (hold_button) {
return 0;
} else if (kbd_type == KEYBOARD_V1) {
diff --git a/firmware/target/arm/sandisk/sansa-c200/button-c200.c b/firmware/target/arm/sandisk/sansa-c200/button-c200.c
index c19d19c1df..e42577fab3 100644
--- a/firmware/target/arm/sandisk/sansa-c200/button-c200.c
+++ b/firmware/target/arm/sandisk/sansa-c200/button-c200.c
@@ -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
diff --git a/firmware/target/coldfire/mpio/hd300/button-hd300.c b/firmware/target/coldfire/mpio/hd300/button-hd300.c
index e84b8d442b..2fdde6f641 100644
--- a/firmware/target/coldfire/mpio/hd300/button-hd300.c
+++ b/firmware/target/coldfire/mpio/hd300/button-hd300.c
@@ -194,13 +194,15 @@ 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
/* Only main hold affects backlight */
if (hold_button != hold_button_old)