summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/debug_menu.c7
-rw-r--r--apps/plugins/iriver_flash.c4
2 files changed, 7 insertions, 4 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)
460int flash_bootloader(const char *filename) 460int 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;