Fix strict non-prototype declaration warn.

Fixes #22.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2026-03-07 17:12:40 +01:00
parent 4c88d712b4
commit 4cd437ed35
7 changed files with 19 additions and 19 deletions

View File

@@ -33,7 +33,7 @@ extern uint16_t flash_read_uint16(uintptr_t addr);
extern uint8_t flash_read_uint8(uintptr_t addr);
extern uint8_t *flash_read(uintptr_t addr);
extern int flash_clear_file(file_t *ef);
extern void low_flash_available();
extern void low_flash_available(void);
#ifndef ENABLE_EMULATION
file_t sef_phy = {.fid = EF_PHY, .parent = 5, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH | FILE_PERSISTENT, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = {0xff}};

View File

@@ -61,7 +61,7 @@ extern uintptr_t flash_read_uintptr(uintptr_t addr);
extern uint16_t flash_read_uint16(uintptr_t addr);
extern uint8_t *flash_read(uintptr_t addr);
extern void low_flash_available();
extern void low_flash_available(void);
uintptr_t last_base;
uint32_t num_files = 0;

View File

@@ -230,7 +230,7 @@ void low_flash_init() {
flash_set_bounds(data_start_addr, data_end_addr);
}
void low_flash_init_core1() {
void low_flash_init_core1(void) {
mutex_enter_blocking(&mtx_flash);
multicore_lockout_victim_init();
locked_out = true;
@@ -243,7 +243,7 @@ void wait_flash_finish() {
sem_acquire_blocking(&sem_flash); //decrease permits
}
void low_flash_available() {
void low_flash_available(void) {
mutex_enter_blocking(&mtx_flash);
flash_available = true;
mutex_exit(&mtx_flash);

View File

@@ -315,7 +315,7 @@ bool otp_is_secure_boot_enabled(uint8_t *bootkey) {
return false;
}
bool otp_is_secure_boot_locked() {
bool otp_is_secure_boot_locked(void) {
uint8_t bootkey_idx = 0xFF;
if (otp_is_secure_boot_enabled(&bootkey_idx) == false) {
return false;
@@ -518,7 +518,7 @@ void otp_migrate_chaff() {
}
#endif
void init_otp_files() {
void init_otp_files(void) {
#ifdef PICO_RP2350
otp_migrate_chaff();

View File

@@ -46,12 +46,12 @@ extern int otp_write_data_raw(uint16_t row, const uint8_t *data, uint16_t len);
#endif
extern int otp_enable_secure_boot(uint8_t bootkey, bool secure_lock);
extern void init_otp_files();
extern void init_otp_files(void);
extern const uint8_t *otp_key_1;
extern const uint8_t *otp_key_2;
extern bool otp_is_secure_boot_enabled(uint8_t *bootkey);
extern bool otp_is_secure_boot_locked();
extern bool otp_is_secure_boot_locked(void);
#endif // _OTP_H_

View File

@@ -47,7 +47,7 @@
extern void do_flash();
extern void low_flash_init();
extern void init_otp_files();
extern void init_otp_files(void);
app_t apps[16];
uint8_t num_apps = 0;
@@ -109,7 +109,7 @@ void execute_tasks();
static bool req_button_pending = false;
bool is_req_button_pending() {
bool is_req_button_pending(void) {
return req_button_pending;
}
@@ -196,7 +196,7 @@ bool picok_board_button_read(void) {
bool button_pressed_state = false;
uint32_t button_pressed_time = 0;
uint8_t button_press = 0;
bool wait_button() {
bool wait_button(void) {
/* Disabled by default. As LED may not be properly configured,
it will not be possible to indicate button press unless it
is commissioned. */
@@ -244,7 +244,7 @@ __attribute__((weak)) int picokey_init() {
bool set_rtc = false;
bool has_set_rtc() {
bool has_set_rtc(void) {
return set_rtc;
}
@@ -259,7 +259,7 @@ void set_rtc_time(time_t t) {
set_rtc = true;
}
time_t get_rtc_time() {
time_t get_rtc_time(void) {
#ifdef PICO_PLATFORM
struct timespec tv;
aon_timer_get_time(&tv);

View File

@@ -70,9 +70,9 @@
#include <time.h>
#endif
extern bool wait_button();
extern bool wait_button(void);
extern void low_flash_init_core1();
extern void low_flash_init_core1(void);
static inline uint16_t make_uint16_t_be(uint8_t b1, uint8_t b2) {
return (b1 << 8) | b2;
@@ -159,12 +159,12 @@ static inline uint32_t put_uint64_t_le(uint64_t n, uint8_t *b) {
return 8;
}
extern void low_flash_available();
extern void low_flash_available(void);
extern int flash_clear_file(file_t *file);
extern int (*button_pressed_cb)(uint8_t);
extern bool is_req_button_pending();
extern bool is_req_button_pending(void);
#define SW_BYTES_REMAINING_00() set_res_sw(0x61, 0x00)
#define SW_WARNING_STATE_UNCHANGED() set_res_sw(0x62, 0x00)
@@ -251,8 +251,8 @@ extern uint8_t pico_serial_hash[32];
#define multicore_launch_func_core1(a) multicore_launch_core1((void (*) (void))a)
#endif
extern bool has_set_rtc();
extern time_t get_rtc_time();
extern bool has_set_rtc(void);
extern time_t get_rtc_time(void);
extern void set_rtc_time(time_t tv_sec);
#endif