Re: rBoot - a new open source boot loader
Posted: Wed Jan 06, 2016 4:15 am
Please apply this patch. Otherwise my compiler will warn (and thus stop: -Werror). It's indeed wrong, function() in C means "arguments not specified", not "no arguments", use function(void) for that.
Code: Select all
diff --git a/appcode/rboot-api.c b/appcode/rboot-api.c
index 6cf15ca..b93f065 100644
--- a/appcode/rboot-api.c
+++ b/appcode/rboot-api.c
@@ -22,7 +22,7 @@ extern "C" {
#endif
// get the rboot config
-rboot_config ICACHE_FLASH_ATTR rboot_get_config() {
+rboot_config ICACHE_FLASH_ATTR rboot_get_config(void) {
rboot_config conf;
spi_flash_read(BOOT_CONFIG_SECTOR * SECTOR_SIZE, (uint32*)&conf, sizeof(rboot_config));
return conf;
@@ -63,7 +63,7 @@ bool ICACHE_FLASH_ATTR rboot_set_config(rboot_config *conf) {
}
// get current boot rom
-uint8 ICACHE_FLASH_ATTR rboot_get_current_rom() {
+uint8 ICACHE_FLASH_ATTR rboot_get_current_rom(void) {
rboot_config conf;
conf = rboot_get_config();
return conf.current_rom;
diff --git a/appcode/rboot-api.h b/appcode/rboot-api.h
index abfcc60..515437f 100644
--- a/appcode/rboot-api.h
+++ b/appcode/rboot-api.h
@@ -24,9 +24,9 @@ typedef struct {
uint8 extra_bytes[4];
} rboot_write_status;
-rboot_config ICACHE_FLASH_ATTR rboot_get_config();
+rboot_config ICACHE_FLASH_ATTR rboot_get_config(void);
bool ICACHE_FLASH_ATTR rboot_set_config(rboot_config *conf);
-uint8 ICACHE_FLASH_ATTR rboot_get_current_rom();
+uint8 ICACHE_FLASH_ATTR rboot_get_current_rom(void);
bool ICACHE_FLASH_ATTR rboot_set_current_rom(uint8 rom);
rboot_write_status ICACHE_FLASH_ATTR rboot_write_init(uint32 start_addr);
bool ICACHE_FLASH_ATTR rboot_write_flash(rboot_write_status *status, uint8 *data, uint16 len);