Skip to content

Commit

Permalink
Fixed warnings - strict-prototypes (#155)
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
  • Loading branch information
ahcorde authored Apr 24, 2024
1 parent f512ead commit 2cc4e4e
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions rosidl_typesupport_c/test/test_type_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
// function still needs to be defined separately. Windows has gotten picky with its compiler
// warnings recently.
#if defined _WIN32 || defined __CYGWIN__
__declspec(dllexport) const rosidl_message_type_support_t * test_message_type_support();
__declspec(dllexport) const rosidl_service_type_support_t * test_service_type_support();
__declspec(dllexport) const rosidl_message_type_support_t * test_message_type_support(void);
__declspec(dllexport) const rosidl_service_type_support_t * test_service_type_support(void);
#else
const rosidl_message_type_support_t * test_message_type_support();
const rosidl_service_type_support_t * test_service_type_support();
const rosidl_message_type_support_t * test_message_type_support(void);
const rosidl_service_type_support_t * test_service_type_support(void);
#endif

static const rosidl_message_type_support_t message_type_support = {
Expand All @@ -37,6 +37,12 @@ static const rosidl_service_type_support_t service_type_support = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};

const rosidl_message_type_support_t * test_message_type_support() {return &message_type_support;}
const rosidl_message_type_support_t * test_message_type_support(void)
{
return &message_type_support;
}

const rosidl_service_type_support_t * test_service_type_support() {return &service_type_support;}
const rosidl_service_type_support_t * test_service_type_support(void)
{
return &service_type_support;
}

0 comments on commit 2cc4e4e

Please sign in to comment.