From 2cc4e4eb1f9cb584484f8e54640ca9ed5fad8767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Wed, 24 Apr 2024 10:48:58 +0200 Subject: [PATCH] Fixed warnings - strict-prototypes (#155) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alejandro Hernández Cordero --- rosidl_typesupport_c/test/test_type_support.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/rosidl_typesupport_c/test/test_type_support.c b/rosidl_typesupport_c/test/test_type_support.c index 21a45fef..75ba10c9 100644 --- a/rosidl_typesupport_c/test/test_type_support.c +++ b/rosidl_typesupport_c/test/test_type_support.c @@ -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 = { @@ -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; +}