Skip to content

Commit

Permalink
test/metal-test.h: Fix warning -Wstrict-prototypes
Browse files Browse the repository at this point in the history
Small change to solve the warning: function declaration isn't a
prototype when compiling tests with -Wstrict-prototypes gcc option
enabled.

Signed-off-by: Vincenzo Calabretta <vincenzo.calabretta@embedded-brains.de>
  • Loading branch information
Vincenzo Calabretta authored and arnopo committed May 6, 2024
1 parent 959fddb commit c3aa4b1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/metal-test.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ extern void metal_add_test_case(struct metal_test_case *test_case);


#define METAL_ADD_TEST(func) \
__attribute__ ((constructor)) static void metal_test_##func() { \
__attribute__ ((constructor)) static void metal_test_##func(void) \
{ \
static struct metal_test_case metal_test_##func = { \
.name = #func, \
.test = func, \
Expand Down

0 comments on commit c3aa4b1

Please sign in to comment.