diff options
-rw-r--r-- | apps/debug_menu.c | 7 | ||||
-rw-r--r-- | apps/plugins/iriver_flash.c | 4 | ||||
-rw-r--r-- | firmware/drivers/isp1583.c | 1 | ||||
-rw-r--r-- | firmware/target/arm/rk27xx/hm801/button-hm801.c | 4 | ||||
-rw-r--r-- | firmware/target/arm/sandisk/sansa-c200/button-c200.c | 2 | ||||
-rw-r--r-- | firmware/target/coldfire/mpio/hd300/button-hd300.c | 4 |
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( | |||
1521 | break; | 1521 | break; |
1522 | 1522 | ||
1523 | case RAWFMT_RAW48: | 1523 | case RAWFMT_RAW48: |
1524 | default: | 1524 | default: { |
1525 | uint32_t tmp; | ||
1526 | memcpy(&tmp, w, sizeof(tmp)); | ||
1525 | /* shows first 4 bytes of raw data as uint32 LE, | 1527 | /* shows first 4 bytes of raw data as uint32 LE, |
1526 | and the ramaining 2 bytes as uint16 LE */ | 1528 | and the ramaining 2 bytes as uint16 LE */ |
1527 | len += snprintf(buf+len, size-len, "%lu", letoh32(*((uint32_t*)w))); | 1529 | len += snprintf(buf+len, size-len, "%lu", letoh32(tmp)); |
1528 | if (w[2] && (len < size)) | 1530 | if (w[2] && (len < size)) |
1529 | len += snprintf(buf+len, size-len, " %u", w[2]); | 1531 | len += snprintf(buf+len, size-len, " %u", w[2]); |
1530 | break; | 1532 | break; |
1533 | } | ||
1531 | } | 1534 | } |
1532 | /* ignore trailing \0 when truncated */ | 1535 | /* ignore trailing \0 when truncated */ |
1533 | if (len >= size) len = size-1; | 1536 | 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) | |||
460 | int flash_bootloader(const char *filename) | 460 | int flash_bootloader(const char *filename) |
461 | { | 461 | { |
462 | char *bootsector; | 462 | char *bootsector; |
463 | int pos, i, len, rc; | 463 | int pos, i, len/*, rc*/; |
464 | unsigned long checksum, sum; | 464 | unsigned long checksum, sum; |
465 | unsigned char *p8; | 465 | unsigned char *p8; |
466 | uint16_t *p16; | 466 | uint16_t *p16; |
@@ -509,7 +509,7 @@ int flash_bootloader(const char *filename) | |||
509 | 509 | ||
510 | /* Erase the bootloader flash section. */ | 510 | /* Erase the bootloader flash section. */ |
511 | for (i = BOOTLOADER_ENTRYPOINT/SEC_SIZE; i < 0x200; i++) | 511 | for (i = BOOTLOADER_ENTRYPOINT/SEC_SIZE; i < 0x200; i++) |
512 | rc = cfi_erase_sector(FB + (SEC_SIZE/2) * i); | 512 | /*rc =*/ cfi_erase_sector(FB + (SEC_SIZE/2) * i); |
513 | 513 | ||
514 | pos = BOOTLOADER_ENTRYPOINT/2; | 514 | pos = BOOTLOADER_ENTRYPOINT/2; |
515 | p16 = (uint16_t *)audiobuf; | 515 | 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) | |||
365 | endpoints[ep].in_ack = 1; | 365 | endpoints[ep].in_ack = 1; |
366 | } | 366 | } |
367 | logf("usb_handle_data_int(%d, %d) finished", ep, dir); | 367 | logf("usb_handle_data_int(%d, %d) finished", ep, dir); |
368 | void(len); | ||
368 | } | 369 | } |
369 | 370 | ||
370 | bool usb_drv_powered(void) | 371 | 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) { | |||
137 | 137 | ||
138 | int button_read_device(void) { | 138 | int button_read_device(void) { |
139 | static bool hold_button = false; | 139 | static bool hold_button = false; |
140 | #ifndef BOOTLOADER | ||
140 | bool hold_button_old; | 141 | bool hold_button_old; |
141 | 142 | ||
142 | hold_button_old = hold_button; | 143 | hold_button_old = hold_button; |
144 | #endif | ||
143 | hold_button = button_hold(); | 145 | hold_button = button_hold(); |
144 | 146 | ||
145 | #ifndef BOOTLOADER | 147 | #ifndef BOOTLOADER |
@@ -147,7 +149,7 @@ int button_read_device(void) { | |||
147 | backlight_hold_changed(hold_button); | 149 | backlight_hold_changed(hold_button); |
148 | } | 150 | } |
149 | #endif | 151 | #endif |
150 | 152 | ||
151 | if (hold_button) { | 153 | if (hold_button) { |
152 | return 0; | 154 | return 0; |
153 | } else if (kbd_type == KEYBOARD_V1) { | 155 | } 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) | |||
40 | { | 40 | { |
41 | int btn = BUTTON_NONE; | 41 | int btn = BUTTON_NONE; |
42 | static bool hold_button = false; | 42 | static bool hold_button = false; |
43 | #ifndef BOOTLOADER | ||
43 | bool hold_button_old; | 44 | bool hold_button_old; |
44 | 45 | ||
45 | /* Hold */ | 46 | /* Hold */ |
46 | hold_button_old = hold_button; | 47 | hold_button_old = hold_button; |
48 | #endif | ||
47 | hold_button = button_hold(); | 49 | hold_button = button_hold(); |
48 | 50 | ||
49 | #ifndef BOOTLOADER | 51 | #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) | |||
194 | int data = 0; | 194 | int data = 0; |
195 | static bool hold_button = false; | 195 | static bool hold_button = false; |
196 | 196 | ||
197 | #ifndef BOOTLOADER | ||
197 | bool hold_button_old; | 198 | bool hold_button_old; |
198 | 199 | ||
199 | 200 | ||
200 | /* read hold buttons status */ | 201 | /* read hold buttons status */ |
201 | hold_button_old = hold_button; | 202 | hold_button_old = hold_button; |
203 | #endif | ||
202 | hold_button = button_hold(); | 204 | hold_button = button_hold(); |
203 | 205 | ||
204 | #ifndef BOOTLOADER | 206 | #ifndef BOOTLOADER |
205 | /* Only main hold affects backlight */ | 207 | /* Only main hold affects backlight */ |
206 | if (hold_button != hold_button_old) | 208 | if (hold_button != hold_button_old) |