Skip to content

Commit

Permalink
chore: use function declaration from header
Browse files Browse the repository at this point in the history
This commit rectifies the issue of using 'f()' instead of 'f(void)',
which are not equivalent.

Affected functions: bgenv_open_oldest, bgenv_open_latest

Resolves the compiler warning: a function declaration without a
prototype is deprecated in all versions of C
[-Werror,-Wstrict-prototypes]

Signed-off-by: Michael Adler <[email protected]>
Signed-off-by: Jan Kiszka <[email protected]>
  • Loading branch information
michaeladler authored and jan-kiszka committed Jul 26, 2023
1 parent d10ee85 commit e8cd7d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions env/env_api_fat.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ BGENV *bgenv_open_by_index(uint32_t index)
return handle;
}

BGENV *bgenv_open_oldest()
BGENV *bgenv_open_oldest(void)
{
uint32_t minrev = 0xFFFFFFFF;
uint32_t min_idx = 0;
Expand All @@ -205,7 +205,7 @@ BGENV *bgenv_open_oldest()
return bgenv_open_by_index(min_idx);
}

BGENV *bgenv_open_latest()
BGENV *bgenv_open_latest(void)
{
uint32_t maxrev = 0;
uint32_t max_idx = 0;
Expand Down

0 comments on commit e8cd7d0

Please sign in to comment.