Add void to function signatures meant to be used without args

This commit is contained in:
Michael Cardell Widerkrantz 2024-03-04 15:53:12 +01:00 committed by dehanj
parent 046343e525
commit e085d0ebd0
No known key found for this signature in database
GPG key ID: 3707A9DBF4BB8F1A
4 changed files with 11 additions and 11 deletions

View file

@ -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};