diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-10-13 14:43:29 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-10-13 15:48:31 -0400 |
commit | b94db707fb7a8ace5c8821ea47d85ec48ca48e26 (patch) | |
tree | 9b0128bd96c8765a8e7abdbe9062e6bcd397da69 | |
parent | 431caa4311c13a0937ae60ac225e780c0a0670b9 (diff) | |
download | rockbox-b94db707fb7a8ace5c8821ea47d85ec48ca48e26.tar.gz rockbox-b94db707fb7a8ace5c8821ea47d85ec48ca48e26.zip |
Fix more warnings.
Change-Id: Ib3a9fc622a46b1fc72e94dcbc6d29d2e430cd81b
-rw-r--r-- | apps/plugins/iriver_flash.c | 4 | ||||
-rw-r--r-- | bootloader/ipod6g.c | 8 | ||||
-rw-r--r-- | firmware/drivers/rtc/rtc_e8564.c | 2 | ||||
-rw-r--r-- | firmware/target/arm/pbell/vibe500/button-vibe500.c | 2 | ||||
-rw-r--r-- | firmware/target/arm/samsung/button-yh82x_yh92x.c | 4 | ||||
-rw-r--r-- | firmware/target/arm/usb-drv-arc.c | 6 | ||||
-rw-r--r-- | firmware/target/coldfire/iaudio/m3/button-m3.c | 4 | ||||
-rw-r--r-- | firmware/target/coldfire/iriver/h100/button-h100.c | 11 | ||||
-rw-r--r-- | firmware/target/coldfire/iriver/h300/button-h300.c | 9 | ||||
-rw-r--r-- | firmware/target/coldfire/mpio/ata-mpio.c | 4 | ||||
-rw-r--r-- | firmware/target/coldfire/mpio/hd200/button-hd200.c | 6 |
11 files changed, 41 insertions, 19 deletions
diff --git a/apps/plugins/iriver_flash.c b/apps/plugins/iriver_flash.c index 2e27a9f748..562a680a60 100644 --- a/apps/plugins/iriver_flash.c +++ b/apps/plugins/iriver_flash.c | |||
@@ -334,7 +334,7 @@ static int get_section_address(int section) | |||
334 | int flash_rockbox(const char *filename, int section) | 334 | int flash_rockbox(const char *filename, int section) |
335 | { | 335 | { |
336 | struct flash_header hdr; | 336 | struct flash_header hdr; |
337 | int pos, i, len, rc; | 337 | int pos, i, len/*, rc */; |
338 | unsigned long checksum, sum; | 338 | unsigned long checksum, sum; |
339 | unsigned char *p8; | 339 | unsigned char *p8; |
340 | uint16_t *p16; | 340 | uint16_t *p16; |
@@ -390,7 +390,7 @@ int flash_rockbox(const char *filename, int section) | |||
390 | rb->lcd_putsf(0, 3, "Erasing... %d%%", (i+SEC_SIZE)*100/len); | 390 | rb->lcd_putsf(0, 3, "Erasing... %d%%", (i+SEC_SIZE)*100/len); |
391 | rb->lcd_update(); | 391 | rb->lcd_update(); |
392 | 392 | ||
393 | rc = cfi_erase_sector(FB + (i + pos)/2); | 393 | /*rc = */cfi_erase_sector(FB + (i + pos)/2); |
394 | } | 394 | } |
395 | 395 | ||
396 | /* Write the magic and size. */ | 396 | /* Write the magic and size. */ |
diff --git a/bootloader/ipod6g.c b/bootloader/ipod6g.c index 0d0a4c53d1..30db29c783 100644 --- a/bootloader/ipod6g.c +++ b/bootloader/ipod6g.c | |||
@@ -326,7 +326,7 @@ static bool pmu_is_hibernated(void) | |||
326 | */ | 326 | */ |
327 | void main(void) | 327 | void main(void) |
328 | { | 328 | { |
329 | int fw = FW_ROCKBOX; | 329 | // int fw = FW_ROCKBOX; |
330 | int rc = 0; | 330 | int rc = 0; |
331 | unsigned char *loadbuffer; | 331 | unsigned char *loadbuffer; |
332 | int (*kernel_entry)(void); | 332 | int (*kernel_entry)(void); |
@@ -337,7 +337,7 @@ void main(void) | |||
337 | i2c_preinit(0); | 337 | i2c_preinit(0); |
338 | 338 | ||
339 | if (pmu_is_hibernated()) { | 339 | if (pmu_is_hibernated()) { |
340 | fw = FW_APPLE; | 340 | // fw = FW_APPLE; |
341 | rc = launch_onb(1); /* 27/2 = 13.5 MHz. */ | 341 | rc = launch_onb(1); /* 27/2 = 13.5 MHz. */ |
342 | } | 342 | } |
343 | 343 | ||
@@ -375,7 +375,7 @@ void main(void) | |||
375 | if ((btn == BUTTON_MENU) | 375 | if ((btn == BUTTON_MENU) |
376 | || (btn == (BUTTON_SELECT|BUTTON_LEFT)) | 376 | || (btn == (BUTTON_SELECT|BUTTON_LEFT)) |
377 | || (btn == (BUTTON_SELECT|BUTTON_PLAY))) { | 377 | || (btn == (BUTTON_SELECT|BUTTON_PLAY))) { |
378 | fw = FW_APPLE; | 378 | // fw = FW_APPLE; |
379 | rc = kernel_launch_onb(); | 379 | rc = kernel_launch_onb(); |
380 | } | 380 | } |
381 | } | 381 | } |
@@ -410,7 +410,7 @@ void main(void) | |||
410 | 410 | ||
411 | /* We wait until HDD spins up to check for hold button */ | 411 | /* We wait until HDD spins up to check for hold button */ |
412 | if (button_hold()) { | 412 | if (button_hold()) { |
413 | fw = FW_APPLE; | 413 | // fw = FW_APPLE; |
414 | printf("Executing OF..."); | 414 | printf("Executing OF..."); |
415 | ata_sleepnow(); | 415 | ata_sleepnow(); |
416 | rc = kernel_launch_onb(); | 416 | rc = kernel_launch_onb(); |
diff --git a/firmware/drivers/rtc/rtc_e8564.c b/firmware/drivers/rtc/rtc_e8564.c index ee2449ffb8..4bb61410db 100644 --- a/firmware/drivers/rtc/rtc_e8564.c +++ b/firmware/drivers/rtc/rtc_e8564.c | |||
@@ -226,7 +226,7 @@ bool rtc_check_alarm_flag(void) | |||
226 | 226 | ||
227 | /* read Control 2 register which contains alarm flag */ | 227 | /* read Control 2 register which contains alarm flag */ |
228 | rv = i2c_readbytes(RTC_ADDR, RTC_CTRL2, 1, &tmp); | 228 | rv = i2c_readbytes(RTC_ADDR, RTC_CTRL2, 1, &tmp); |
229 | 229 | (void)rv; | |
230 | return (tmp & RTC_AF); | 230 | return (tmp & RTC_AF); |
231 | } | 231 | } |
232 | #endif /* HAVE_RTC_ALARM */ | 232 | #endif /* HAVE_RTC_ALARM */ |
diff --git a/firmware/target/arm/pbell/vibe500/button-vibe500.c b/firmware/target/arm/pbell/vibe500/button-vibe500.c index 9afc9eecab..1279e86725 100644 --- a/firmware/target/arm/pbell/vibe500/button-vibe500.c +++ b/firmware/target/arm/pbell/vibe500/button-vibe500.c | |||
@@ -97,9 +97,11 @@ int button_read_device(void) | |||
97 | int buttons = int_btn; | 97 | int buttons = int_btn; |
98 | unsigned char state; | 98 | unsigned char state; |
99 | static bool hold_button = false; | 99 | static bool hold_button = false; |
100 | #ifndef BOOTLOADER | ||
100 | bool hold_button_old; | 101 | bool hold_button_old; |
101 | 102 | ||
102 | hold_button_old = hold_button; | 103 | hold_button_old = hold_button; |
104 | #endif | ||
103 | hold_button = button_hold(); | 105 | hold_button = button_hold(); |
104 | 106 | ||
105 | #ifndef BOOTLOADER | 107 | #ifndef BOOTLOADER |
diff --git a/firmware/target/arm/samsung/button-yh82x_yh92x.c b/firmware/target/arm/samsung/button-yh82x_yh92x.c index ff8a580d2a..7d0f390644 100644 --- a/firmware/target/arm/samsung/button-yh82x_yh92x.c +++ b/firmware/target/arm/samsung/button-yh82x_yh92x.c | |||
@@ -103,10 +103,14 @@ int button_read_device(void) | |||
103 | int btn = BUTTON_NONE; | 103 | int btn = BUTTON_NONE; |
104 | #endif /* (SAMSUNG_YH920) || (SAMSUNG_YH925) */ | 104 | #endif /* (SAMSUNG_YH920) || (SAMSUNG_YH925) */ |
105 | static bool hold_button = false; | 105 | static bool hold_button = false; |
106 | #ifndef BOOTLOADER | ||
106 | bool hold_button_old; | 107 | bool hold_button_old; |
108 | #endif | ||
107 | 109 | ||
108 | /* Hold */ | 110 | /* Hold */ |
111 | #ifndef BOOTLOADER | ||
109 | hold_button_old = hold_button; | 112 | hold_button_old = hold_button; |
113 | #endif | ||
110 | hold_button = button_hold(); | 114 | hold_button = button_hold(); |
111 | 115 | ||
112 | #ifndef BOOTLOADER | 116 | #ifndef BOOTLOADER |
diff --git a/firmware/target/arm/usb-drv-arc.c b/firmware/target/arm/usb-drv-arc.c index 44d006b30f..b19b635923 100644 --- a/firmware/target/arm/usb-drv-arc.c +++ b/firmware/target/arm/usb-drv-arc.c | |||
@@ -352,12 +352,16 @@ static struct queue_head qh_array[USB_NUM_ENDPOINTS*2] | |||
352 | static struct semaphore transfer_completion_signal[USB_NUM_ENDPOINTS*2] | 352 | static struct semaphore transfer_completion_signal[USB_NUM_ENDPOINTS*2] |
353 | SHAREDBSS_ATTR; | 353 | SHAREDBSS_ATTR; |
354 | 354 | ||
355 | static const unsigned int pipe2mask[] = { | 355 | static const unsigned int pipe2mask[USB_NUM_ENDPOINTS*2] = { |
356 | 0x01, 0x010000, | 356 | 0x01, 0x010000, |
357 | 0x02, 0x020000, | 357 | 0x02, 0x020000, |
358 | 0x04, 0x040000, | 358 | 0x04, 0x040000, |
359 | #if USB_NUM_ENDPOINTS > 3 | ||
359 | 0x08, 0x080000, | 360 | 0x08, 0x080000, |
361 | #endif | ||
362 | #if USB_NUM_ENDPOINTS > 4 | ||
360 | 0x10, 0x100000, | 363 | 0x10, 0x100000, |
364 | #endif | ||
361 | }; | 365 | }; |
362 | 366 | ||
363 | /*-------------------------------------------------------------------------*/ | 367 | /*-------------------------------------------------------------------------*/ |
diff --git a/firmware/target/coldfire/iaudio/m3/button-m3.c b/firmware/target/coldfire/iaudio/m3/button-m3.c index 53d02ec449..1c7f4a15de 100644 --- a/firmware/target/coldfire/iaudio/m3/button-m3.c +++ b/firmware/target/coldfire/iaudio/m3/button-m3.c | |||
@@ -50,15 +50,11 @@ int button_read_device(void) | |||
50 | { | 50 | { |
51 | int btn = BUTTON_NONE; | 51 | int btn = BUTTON_NONE; |
52 | #ifndef BOOTLOADER | 52 | #ifndef BOOTLOADER |
53 | bool hold_button_old; | ||
54 | bool remote_hold_button_old; | 53 | bool remote_hold_button_old; |
55 | #endif | 54 | #endif |
56 | int data; | 55 | int data; |
57 | 56 | ||
58 | /* normal buttons */ | 57 | /* normal buttons */ |
59 | #ifndef BOOTLOADER | ||
60 | hold_button_old = hold_button; | ||
61 | #endif | ||
62 | hold_button = button_hold(); | 58 | hold_button = button_hold(); |
63 | 59 | ||
64 | if (!hold_button) | 60 | if (!hold_button) |
diff --git a/firmware/target/coldfire/iriver/h100/button-h100.c b/firmware/target/coldfire/iriver/h100/button-h100.c index dbaefdcf2a..63f772b65e 100644 --- a/firmware/target/coldfire/iriver/h100/button-h100.c +++ b/firmware/target/coldfire/iriver/h100/button-h100.c | |||
@@ -40,7 +40,7 @@ bool button_hold(void) | |||
40 | } | 40 | } |
41 | 41 | ||
42 | static bool remote_button_hold_only(void) | 42 | static bool remote_button_hold_only(void) |
43 | { | 43 | { |
44 | if(remote_type() == REMOTETYPE_H300_NONLCD) | 44 | if(remote_type() == REMOTETYPE_H300_NONLCD) |
45 | return adc_scan(ADC_REMOTE)<0x0d; /* hold should be 0x00 */ | 45 | return adc_scan(ADC_REMOTE)<0x0d; /* hold should be 0x00 */ |
46 | else | 46 | else |
@@ -68,14 +68,17 @@ int button_read_device(void) | |||
68 | static bool remote_hold_button = false; | 68 | static bool remote_hold_button = false; |
69 | static int prev_data = 0xff; | 69 | static int prev_data = 0xff; |
70 | static int last_valid = 0xff; | 70 | static int last_valid = 0xff; |
71 | #ifndef BOOTLOADER | ||
71 | bool hold_button_old; | 72 | bool hold_button_old; |
72 | bool remote_hold_button_old; | 73 | bool remote_hold_button_old; |
74 | #endif | ||
73 | 75 | ||
74 | /* normal buttons */ | 76 | /* normal buttons */ |
77 | #ifndef BOOTLOADER | ||
75 | hold_button_old = hold_button; | 78 | hold_button_old = hold_button; |
79 | #endif | ||
76 | hold_button = button_hold(); | 80 | hold_button = button_hold(); |
77 | 81 | ||
78 | |||
79 | #ifndef BOOTLOADER | 82 | #ifndef BOOTLOADER |
80 | if (hold_button != hold_button_old) | 83 | if (hold_button != hold_button_old) |
81 | backlight_hold_changed(hold_button); | 84 | backlight_hold_changed(hold_button); |
@@ -120,7 +123,9 @@ int button_read_device(void) | |||
120 | } | 123 | } |
121 | 124 | ||
122 | /* remote buttons */ | 125 | /* remote buttons */ |
126 | #ifndef BOOTLOADER | ||
123 | remote_hold_button_old = remote_hold_button; | 127 | remote_hold_button_old = remote_hold_button; |
128 | #endif | ||
124 | remote_hold_button = remote_button_hold_only(); | 129 | remote_hold_button = remote_button_hold_only(); |
125 | 130 | ||
126 | #ifndef BOOTLOADER | 131 | #ifndef BOOTLOADER |
diff --git a/firmware/target/coldfire/iriver/h300/button-h300.c b/firmware/target/coldfire/iriver/h300/button-h300.c index 74c14fb144..437c9fd2d3 100644 --- a/firmware/target/coldfire/iriver/h300/button-h300.c +++ b/firmware/target/coldfire/iriver/h300/button-h300.c | |||
@@ -84,14 +84,17 @@ int button_read_device(void) | |||
84 | static bool remote_hold_button = false; | 84 | static bool remote_hold_button = false; |
85 | static int prev_data = 0xff; | 85 | static int prev_data = 0xff; |
86 | static int last_valid = 0xff; | 86 | static int last_valid = 0xff; |
87 | #ifndef BOOTLOADER | ||
87 | bool hold_button_old; | 88 | bool hold_button_old; |
88 | bool remote_hold_button_old; | 89 | bool remote_hold_button_old; |
90 | #endif | ||
89 | 91 | ||
90 | /* normal buttons */ | 92 | /* normal buttons */ |
93 | #ifndef BOOTLOADER | ||
91 | hold_button_old = hold_button; | 94 | hold_button_old = hold_button; |
95 | #endif | ||
92 | hold_button = button_hold(); | 96 | hold_button = button_hold(); |
93 | 97 | ||
94 | |||
95 | #ifndef BOOTLOADER | 98 | #ifndef BOOTLOADER |
96 | if (hold_button != hold_button_old) | 99 | if (hold_button != hold_button_old) |
97 | backlight_hold_changed(hold_button); | 100 | backlight_hold_changed(hold_button); |
@@ -130,7 +133,9 @@ int button_read_device(void) | |||
130 | } | 133 | } |
131 | 134 | ||
132 | /* remote buttons */ | 135 | /* remote buttons */ |
136 | #ifndef BOOTLOADER | ||
133 | remote_hold_button_old = remote_hold_button; | 137 | remote_hold_button_old = remote_hold_button; |
138 | #endif | ||
134 | remote_hold_button = remote_button_hold_only(); | 139 | remote_hold_button = remote_button_hold_only(); |
135 | 140 | ||
136 | #ifndef BOOTLOADER | 141 | #ifndef BOOTLOADER |
diff --git a/firmware/target/coldfire/mpio/ata-mpio.c b/firmware/target/coldfire/mpio/ata-mpio.c index af082640bf..94a572a0e8 100644 --- a/firmware/target/coldfire/mpio/ata-mpio.c +++ b/firmware/target/coldfire/mpio/ata-mpio.c | |||
@@ -39,7 +39,9 @@ void ata_reset(void) | |||
39 | 39 | ||
40 | void ata_enable(bool on) | 40 | void ata_enable(bool on) |
41 | { | 41 | { |
42 | #ifndef BOOTLOADER | ||
42 | static bool init = true; | 43 | static bool init = true; |
44 | #endif | ||
43 | 45 | ||
44 | /* Ide power toggling is a nasty hack to allow USB bridge operation | 46 | /* Ide power toggling is a nasty hack to allow USB bridge operation |
45 | * in rockbox. For some reason GL811E bridge doesn't like the state | 47 | * in rockbox. For some reason GL811E bridge doesn't like the state |
@@ -59,8 +61,8 @@ void ata_enable(bool on) | |||
59 | sleep(1); | 61 | sleep(1); |
60 | ide_power_enable(true); | 62 | ide_power_enable(true); |
61 | } | 63 | } |
62 | #endif | ||
63 | init = false; | 64 | init = false; |
65 | #endif | ||
64 | } | 66 | } |
65 | else | 67 | else |
66 | { | 68 | { |
diff --git a/firmware/target/coldfire/mpio/hd200/button-hd200.c b/firmware/target/coldfire/mpio/hd200/button-hd200.c index 27b0d50fb5..5ff70783cd 100644 --- a/firmware/target/coldfire/mpio/hd200/button-hd200.c +++ b/firmware/target/coldfire/mpio/hd200/button-hd200.c | |||
@@ -69,17 +69,21 @@ int button_read_device(void) | |||
69 | static bool hold_button = false; | 69 | static bool hold_button = false; |
70 | bool remote_hold_button = false; | 70 | bool remote_hold_button = false; |
71 | 71 | ||
72 | #ifndef BOOTLOADER | ||
72 | bool hold_button_old; | 73 | bool hold_button_old; |
74 | #endif | ||
73 | bool remote_present; | 75 | bool remote_present; |
74 | 76 | ||
75 | /* check if we have remote connected */ | 77 | /* check if we have remote connected */ |
76 | remote_present = remote_detect(); | 78 | remote_present = remote_detect(); |
77 | 79 | ||
78 | /* read hold buttons status */ | 80 | /* read hold buttons status */ |
81 | #ifndef BOOTLOADER | ||
79 | hold_button_old = hold_button; | 82 | hold_button_old = hold_button; |
83 | #endif | ||
80 | hold_button = button_hold(); | 84 | hold_button = button_hold(); |
81 | remote_hold_button = remote_button_hold(); | 85 | remote_hold_button = remote_button_hold(); |
82 | 86 | ||
83 | #ifndef BOOTLOADER | 87 | #ifndef BOOTLOADER |
84 | /* Only main hold affects backlight */ | 88 | /* Only main hold affects backlight */ |
85 | if (hold_button != hold_button_old) | 89 | if (hold_button != hold_button_old) |