diff --git a/hw/application_fpga/fw/testfw/main.c b/hw/application_fpga/fw/testfw/main.c index 835d370..4302097 100644 --- a/hw/application_fpga/fw/testfw/main.c +++ b/hw/application_fpga/fw/testfw/main.c @@ -106,7 +106,7 @@ uint32_t wait_timer_tick(uint32_t last_timer) } } -void zero_fwram() +void zero_fwram(void) { for (int i = 0; i < TK1_MMIO_FW_RAM_SIZE; i++) { fw_ram[i] = 0x00; @@ -149,7 +149,7 @@ void failmsg(char *s) puts("\r\n"); } -int main() +int main(void) { // Function pointer to blake2s() volatile int (*fw_blake2s)(void *, unsigned long, const void *, diff --git a/hw/application_fpga/fw/tk1/main.c b/hw/application_fpga/fw/tk1/main.c index 2aa6240..60c1e71 100644 --- a/hw/application_fpga/fw/tk1/main.c +++ b/hw/application_fpga/fw/tk1/main.c @@ -42,9 +42,9 @@ struct context { uint8_t uss[32]; // User Supplied Secret, if any }; -static void print_hw_version(); +static void print_hw_version(void); static void print_digest(uint8_t *md); -static uint32_t rnd_word(); +static uint32_t rnd_word(void); static void compute_cdi(const uint8_t *digest, const uint8_t use_uss, const uint8_t *uss); static void copy_name(uint8_t *buf, const size_t bufsiz, const uint32_t word); @@ -55,9 +55,9 @@ static enum state loading_commands(const struct frame_header *hdr, const uint8_t *cmd, enum state state, struct context *ctx); static void run(const struct context *ctx); -static void scramble_ram(); +static void scramble_ram(void); -static void print_hw_version() +static void print_hw_version(void) { htif_puts("Hello, I'm firmware with"); htif_puts(" tk1_name0:"); @@ -81,7 +81,7 @@ static void print_digest(uint8_t *md) htif_lf(); } -static uint32_t rnd_word() +static uint32_t rnd_word(void) { while ((*trng_status & (1 << TK1_MMIO_TRNG_STATUS_READY_BIT)) == 0) { } @@ -362,7 +362,7 @@ static void run(const struct context *ctx) __builtin_unreachable(); } -static void scramble_ram() +static void scramble_ram(void) { uint32_t *ram = (uint32_t *)(TK1_RAM_BASE); uint32_t rnd = rnd_word(); @@ -384,7 +384,7 @@ static void scramble_ram() *ram_scramble = rnd_word(); } -int main() +int main(void) { struct context ctx = {0}; struct frame_header hdr = {0}; diff --git a/hw/application_fpga/fw/tk1/proto.c b/hw/application_fpga/fw/tk1/proto.c index a78c539..b01a3f7 100644 --- a/hw/application_fpga/fw/tk1/proto.c +++ b/hw/application_fpga/fw/tk1/proto.c @@ -142,7 +142,7 @@ static void write(uint8_t *buf, size_t nbytes) } } -uint8_t readbyte() +uint8_t readbyte(void) { for (;;) { if (*can_rx) { diff --git a/hw/application_fpga/fw/tk1/proto.h b/hw/application_fpga/fw/tk1/proto.h index 105d5ad..4bf225f 100644 --- a/hw/application_fpga/fw/tk1/proto.h +++ b/hw/application_fpga/fw/tk1/proto.h @@ -51,7 +51,7 @@ struct frame_header { }; void writebyte(uint8_t b); -uint8_t readbyte(); +uint8_t readbyte(void); void fwreply(struct frame_header hdr, enum fwcmd rspcode, uint8_t *buf); int readcommand(struct frame_header *hdr, uint8_t *cmd, int state); #endif