diff --git a/rcl/include/rcl/logging_external_interface.h b/rcl/include/rcl/logging_external_interface.h index 60e2fed1b9..97961a772d 100644 --- a/rcl/include/rcl/logging_external_interface.h +++ b/rcl/include/rcl/logging_external_interface.h @@ -19,6 +19,10 @@ #include "rcl/types.h" #include "rcl/visibility_control.h" +#ifdef __cplusplus +extern "C" { +#endif + /// Initialize the external logging library. /** * \param[in] config_file The location of a config file that the external @@ -78,6 +82,11 @@ rcl_logging_external_log(int severity, const char * name, const char * msg); * \return RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC +RCL_WARN_UNUSED rcl_ret_t rcl_logging_external_set_logger_level(const char * name, int level); +#ifdef __cplusplus +} +#endif + #endif // RCL__LOGGING_EXTERNAL_INTERFACE_H_ diff --git a/rcl/include/rcl/macros.h b/rcl/include/rcl/macros.h index cbf5b89d01..2729f920f8 100644 --- a/rcl/include/rcl/macros.h +++ b/rcl/include/rcl/macros.h @@ -20,14 +20,10 @@ extern "C" { #endif -#ifndef _WIN32 /// Ignored return values of functions with this macro will emit a warning. -# define RCL_WARN_UNUSED __attribute__((warn_unused_result)) -#else -# define RCL_WARN_UNUSED _Check_return_ -#endif +#define RCL_WARN_UNUSED RCUTILS_WARN_UNUSED -#define RCL_UNUSED(x) (void)(x) +#define RCL_UNUSED(x) RCUTILS_UNUSED(x) #ifdef __cplusplus }