Change #if to #ifdef. (#229)

Needed because you can't use preprocessor on undefined variables in
MISRA.
This commit is contained in:
Michael Carroll 2018-05-01 17:25:24 -05:00 committed by GitHub
parent 5142a8a4b4
commit e8491ab8ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
48 changed files with 95 additions and 95 deletions

View file

@ -15,7 +15,7 @@
#ifndef RCL__ALLOCATOR_H_ #ifndef RCL__ALLOCATOR_H_
#define RCL__ALLOCATOR_H_ #define RCL__ALLOCATOR_H_
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -34,7 +34,7 @@ typedef rcutils_allocator_t rcl_allocator_t;
#define RCL_CHECK_ALLOCATOR_WITH_MSG(allocator, msg, fail_statement) \ #define RCL_CHECK_ALLOCATOR_WITH_MSG(allocator, msg, fail_statement) \
RCUTILS_CHECK_ALLOCATOR_WITH_MSG(allocator, msg, fail_statement) RCUTILS_CHECK_ALLOCATOR_WITH_MSG(allocator, msg, fail_statement)
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -20,7 +20,7 @@
#include "rcl/types.h" #include "rcl/types.h"
#include "rcl/visibility_control.h" #include "rcl/visibility_control.h"
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -248,7 +248,7 @@ RCL_WARN_UNUSED
rcl_arguments_t * rcl_arguments_t *
rcl_get_global_arguments(); rcl_get_global_arguments();
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -15,7 +15,7 @@
#ifndef RCL__CLIENT_H_ #ifndef RCL__CLIENT_H_
#define RCL__CLIENT_H_ #define RCL__CLIENT_H_
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -398,7 +398,7 @@ RCL_PUBLIC
bool bool
rcl_client_is_valid(const rcl_client_t * client, rcl_allocator_t * error_msg_allocator); rcl_client_is_valid(const rcl_client_t * client, rcl_allocator_t * error_msg_allocator);
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -15,7 +15,7 @@
#ifndef RCL__EXPAND_TOPIC_NAME_H_ #ifndef RCL__EXPAND_TOPIC_NAME_H_
#define RCL__EXPAND_TOPIC_NAME_H_ #define RCL__EXPAND_TOPIC_NAME_H_
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -137,7 +137,7 @@ RCL_WARN_UNUSED
rcl_ret_t rcl_ret_t
rcl_get_default_topic_name_substitutions(rcutils_string_map_t * string_map); rcl_get_default_topic_name_substitutions(rcutils_string_map_t * string_map);
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -15,7 +15,7 @@
#ifndef RCL__GRAPH_H_ #ifndef RCL__GRAPH_H_
#define RCL__GRAPH_H_ #define RCL__GRAPH_H_
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -349,7 +349,7 @@ rcl_service_server_is_available(
const rcl_client_t * client, const rcl_client_t * client,
bool * is_available); bool * is_available);
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -15,7 +15,7 @@
#ifndef RCL__GUARD_CONDITION_H_ #ifndef RCL__GUARD_CONDITION_H_
#define RCL__GUARD_CONDITION_H_ #define RCL__GUARD_CONDITION_H_
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -245,7 +245,7 @@ RCL_WARN_UNUSED
rmw_guard_condition_t * rmw_guard_condition_t *
rcl_guard_condition_get_rmw_handle(const rcl_guard_condition_t * guard_condition); rcl_guard_condition_get_rmw_handle(const rcl_guard_condition_t * guard_condition);
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -15,7 +15,7 @@
#ifndef RCL__MACROS_H_ #ifndef RCL__MACROS_H_
#define RCL__MACROS_H_ #define RCL__MACROS_H_
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -27,7 +27,7 @@ extern "C"
# define RCL_WARN_UNUSED _Check_return_ # define RCL_WARN_UNUSED _Check_return_
#endif #endif
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -15,7 +15,7 @@
#ifndef RCL__NODE_H_ #ifndef RCL__NODE_H_
#define RCL__NODE_H_ #define RCL__NODE_H_
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -516,7 +516,7 @@ RCL_WARN_UNUSED
const char * const char *
rcl_node_get_logger_name(const rcl_node_t * node); rcl_node_get_logger_name(const rcl_node_t * node);
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -15,7 +15,7 @@
#ifndef RCL__PUBLISHER_H_ #ifndef RCL__PUBLISHER_H_
#define RCL__PUBLISHER_H_ #define RCL__PUBLISHER_H_
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -363,7 +363,7 @@ rcl_publisher_is_valid(
const rcl_publisher_t * publisher, const rcl_publisher_t * publisher,
rcl_allocator_t * error_msg_allocator); rcl_allocator_t * error_msg_allocator);
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -68,7 +68,7 @@
#ifndef RCL__RCL_H_ #ifndef RCL__RCL_H_
#define RCL__RCL_H_ #define RCL__RCL_H_
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -193,7 +193,7 @@ RCL_WARN_UNUSED
bool bool
rcl_ok(void); rcl_ok(void);
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -21,7 +21,7 @@
#include "rcl/types.h" #include "rcl/types.h"
#include "rcl/visibility_control.h" #include "rcl/visibility_control.h"
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -232,7 +232,7 @@ rcl_remap_node_namespace(
rcl_allocator_t allocator, rcl_allocator_t allocator,
char ** output_namespace); char ** output_namespace);
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -15,7 +15,7 @@
#ifndef RCL__SERVICE_H_ #ifndef RCL__SERVICE_H_
#define RCL__SERVICE_H_ #define RCL__SERVICE_H_
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -410,7 +410,7 @@ RCL_PUBLIC
bool bool
rcl_service_is_valid(const rcl_service_t * service, rcl_allocator_t * error_msg_allocator); rcl_service_is_valid(const rcl_service_t * service, rcl_allocator_t * error_msg_allocator);
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -15,7 +15,7 @@
#ifndef RCL__SUBSCRIPTION_H_ #ifndef RCL__SUBSCRIPTION_H_
#define RCL__SUBSCRIPTION_H_ #define RCL__SUBSCRIPTION_H_
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -367,7 +367,7 @@ rcl_subscription_is_valid(
const rcl_subscription_t * subscription, const rcl_subscription_t * subscription,
rcl_allocator_t * error_msg_allocator); rcl_allocator_t * error_msg_allocator);
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -15,7 +15,7 @@
#ifndef RCL__TIME_H_ #ifndef RCL__TIME_H_
#define RCL__TIME_H_ #define RCL__TIME_H_
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -358,7 +358,7 @@ rcl_ret_t
rcl_set_ros_time_override( rcl_set_ros_time_override(
rcl_clock_t * clock, rcl_time_point_value_t time_value); rcl_clock_t * clock, rcl_time_point_value_t time_value);
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -15,7 +15,7 @@
#ifndef RCL__TIMER_H_ #ifndef RCL__TIMER_H_
#define RCL__TIMER_H_ #define RCL__TIMER_H_
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -526,7 +526,7 @@ rcl_timer_reset(rcl_timer_t * timer);
const rcl_allocator_t * const rcl_allocator_t *
rcl_timer_get_allocator(const rcl_timer_t * timer); rcl_timer_get_allocator(const rcl_timer_t * timer);
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -15,7 +15,7 @@
#ifndef RCL__VALIDATE_TOPIC_NAME_H_ #ifndef RCL__VALIDATE_TOPIC_NAME_H_
#define RCL__VALIDATE_TOPIC_NAME_H_ #define RCL__VALIDATE_TOPIC_NAME_H_
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -116,7 +116,7 @@ RCL_WARN_UNUSED
const char * const char *
rcl_topic_name_validation_result_string(int validation_result); rcl_topic_name_validation_result_string(int validation_result);
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -15,7 +15,7 @@
#ifndef RCL__VISIBILITY_CONTROL_H_ #ifndef RCL__VISIBILITY_CONTROL_H_
#define RCL__VISIBILITY_CONTROL_H_ #define RCL__VISIBILITY_CONTROL_H_
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -51,7 +51,7 @@ extern "C"
#define RCL_PUBLIC_TYPE #define RCL_PUBLIC_TYPE
#endif #endif
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -15,7 +15,7 @@
#ifndef RCL__WAIT_H_ #ifndef RCL__WAIT_H_
#define RCL__WAIT_H_ #define RCL__WAIT_H_
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -501,7 +501,7 @@ RCL_WARN_UNUSED
rcl_ret_t rcl_ret_t
rcl_wait(rcl_wait_set_t * wait_set, int64_t timeout); rcl_wait(rcl_wait_set_t * wait_set, int64_t timeout);
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -27,7 +27,7 @@
#include "rmw/validate_namespace.h" #include "rmw/validate_namespace.h"
#include "rmw/validate_node_name.h" #include "rmw/validate_node_name.h"
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -843,6 +843,6 @@ _rcl_parse_remap_rule(
return ret; return ret;
} }
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -18,7 +18,7 @@
#include "rcl/arguments.h" #include "rcl/arguments.h"
#include "./remap_impl.h" #include "./remap_impl.h"
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -40,7 +40,7 @@ typedef struct rcl_arguments_impl_t
rcl_allocator_t allocator; rcl_allocator_t allocator;
} rcl_arguments_impl_t; } rcl_arguments_impl_t;
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -331,6 +331,6 @@ rcl_client_is_valid(const rcl_client_t * client, rcl_allocator_t * error_msg_all
client->impl->rmw_handle, "client's rmw handle is invalid", return false, alloc); client->impl->rmw_handle, "client's rmw handle is invalid", return false, alloc);
return true; return true;
} }
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -68,6 +68,6 @@ rcl_convert_rmw_ret_to_rcl_ret(rmw_ret_t rmw_ret)
} }
} }
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -15,7 +15,7 @@
#ifndef RCL__COMMON_H_ #ifndef RCL__COMMON_H_
#define RCL__COMMON_H_ #define RCL__COMMON_H_
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -47,7 +47,7 @@ rcl_impl_getenv(const char * env_name, const char ** env_value);
rcl_ret_t rcl_ret_t
rcl_convert_rmw_ret_to_rcl_ret(rmw_ret_t rmw_ret); rcl_convert_rmw_ret_to_rcl_ret(rmw_ret_t rmw_ret);
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -246,6 +246,6 @@ rcl_get_default_topic_name_substitutions(rcutils_string_map_t * string_map)
return RCL_RET_OK; return RCL_RET_OK;
} }
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -180,6 +180,6 @@ rcl_service_server_is_available(
return rcl_convert_rmw_ret_to_rcl_ret(rmw_ret); return rcl_convert_rmw_ret_to_rcl_ret(rmw_ret);
} }
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -176,6 +176,6 @@ rcl_guard_condition_get_rmw_handle(const rcl_guard_condition_t * guard_condition
return guard_condition->impl->rmw_handle; return guard_condition->impl->rmw_handle;
} }
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -581,6 +581,6 @@ rcl_node_get_logger_name(const rcl_node_t * node)
return node->impl->logger_name; return node->impl->logger_name;
} }
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -293,6 +293,6 @@ rcl_publisher_is_valid(
return true; return true;
} }
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -155,6 +155,6 @@ rcl_ok()
return rcl_atomic_load_bool(&__rcl_is_initialized); return rcl_atomic_load_bool(&__rcl_is_initialized);
} }
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -22,7 +22,7 @@
#include "rcutils/strdup.h" #include "rcutils/strdup.h"
#include "rcutils/types/string_map.h" #include "rcutils/types/string_map.h"
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -313,6 +313,6 @@ rcl_remap_node_namespace(
allocator, output_namespace); allocator, output_namespace);
} }
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -17,7 +17,7 @@
#include "rcl/types.h" #include "rcl/types.h"
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -101,7 +101,7 @@ rcl_ret_t
rcl_remap_fini( rcl_remap_fini(
rcl_remap_t * rule); rcl_remap_t * rule);
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -150,6 +150,6 @@ INITIALIZER(initialize) {
} }
} }
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -338,6 +338,6 @@ rcl_service_is_valid(const rcl_service_t * service, rcl_allocator_t * error_msg_
return true; return true;
} }
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -74,7 +74,7 @@
#ifndef _STDATOMIC_H_ // NOLINT #ifndef _STDATOMIC_H_ // NOLINT
#define _STDATOMIC_H_ #define _STDATOMIC_H_
#if __cplusplus #ifdef __cplusplus
// This will suppress warnings about _Bool not being defined. // This will suppress warnings about _Bool not being defined.
typedef bool _Bool; typedef bool _Bool;
#endif #endif

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -327,6 +327,6 @@ rcl_subscription_is_valid(
return true; return true;
} }
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -280,6 +280,6 @@ rcl_timer_get_allocator(const rcl_timer_t * timer)
return &timer->impl->allocator; return &timer->impl->allocator;
} }
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -231,6 +231,6 @@ rcl_topic_name_validation_result_string(int validation_result)
} }
} }
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -684,6 +684,6 @@ rcl_wait(rcl_wait_set_t * wait_set, int64_t timeout)
return RCL_RET_OK; return RCL_RET_OK;
} }
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -19,7 +19,7 @@
#include "rcl_lifecycle/visibility_control.h" #include "rcl_lifecycle/visibility_control.h"
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -82,7 +82,7 @@ typedef struct rcl_lifecycle_state_machine_t
rcl_lifecycle_com_interface_t com_interface; rcl_lifecycle_com_interface_t com_interface;
} rcl_lifecycle_state_machine_t; } rcl_lifecycle_state_machine_t;
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -15,7 +15,7 @@
#ifndef RCL_LIFECYCLE__RCL_LIFECYCLE_H_ #ifndef RCL_LIFECYCLE__RCL_LIFECYCLE_H_
#define RCL_LIFECYCLE__RCL_LIFECYCLE_H_ #define RCL_LIFECYCLE__RCL_LIFECYCLE_H_
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -135,7 +135,7 @@ RCL_LIFECYCLE_PUBLIC
void void
rcl_print_state_machine(const rcl_lifecycle_state_machine_t * state_machine); rcl_print_state_machine(const rcl_lifecycle_state_machine_t * state_machine);
#if __cplusplus #ifdef __cplusplus
} }
#endif // extern "C" #endif // extern "C"

View file

@ -20,7 +20,7 @@
#include "rcl_lifecycle/data_types.h" #include "rcl_lifecycle/data_types.h"
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -74,7 +74,7 @@ rcl_lifecycle_get_transitions(
rcl_lifecycle_transition_map_t * transition_map, rcl_lifecycle_transition_map_t * transition_map,
unsigned int state_id); unsigned int state_id);
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -323,6 +323,6 @@ rcl_lifecycle_com_interface_publish_notification(
return rcl_publish(&com_interface->pub_transition_event, &msg); return rcl_publish(&com_interface->pub_transition_event, &msg);
} }
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -15,7 +15,7 @@
#ifndef COM_INTERFACE_H_ #ifndef COM_INTERFACE_H_
#define COM_INTERFACE_H_ #define COM_INTERFACE_H_
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -51,7 +51,7 @@ rcl_lifecycle_com_interface_publish_notification(
rcl_lifecycle_com_interface_t * com_interface, rcl_lifecycle_com_interface_t * com_interface,
const rcl_lifecycle_state_t * start, const rcl_lifecycle_state_t * goal); const rcl_lifecycle_state_t * start, const rcl_lifecycle_state_t * goal);
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -27,7 +27,7 @@
#include "default_state_machine.h" // NOLINT #include "default_state_machine.h" // NOLINT
#include "states.h" // NOLINT #include "states.h" // NOLINT
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -476,6 +476,6 @@ fail:
return RCL_RET_ERROR; return RCL_RET_ERROR;
} }
#if __cplusplus #ifdef __cplusplus
} }
#endif // extern "C" #endif // extern "C"

View file

@ -21,7 +21,7 @@
#include "rcl_lifecycle/data_types.h" #include "rcl_lifecycle/data_types.h"
#include "rcl_lifecycle/visibility_control.h" #include "rcl_lifecycle/visibility_control.h"
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -32,7 +32,7 @@ rcl_ret_t
rcl_lifecycle_init_default_state_machine( rcl_lifecycle_init_default_state_machine(
rcl_lifecycle_state_machine_t * state_machine, const rcl_allocator_t * allocator); rcl_lifecycle_state_machine_t * state_machine, const rcl_allocator_t * allocator);
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -360,6 +360,6 @@ rcl_print_state_machine(const rcl_lifecycle_state_machine_t * state_machine)
} }
} }
} }
#if __cplusplus #ifdef __cplusplus
} }
#endif // extern "C" #endif // extern "C"

View file

@ -18,7 +18,7 @@
#include "rcl_lifecycle/data_types.h" #include "rcl_lifecycle/data_types.h"
#include "rcl_lifecycle/visibility_control.h" #include "rcl_lifecycle/visibility_control.h"
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -44,7 +44,7 @@ extern const rcl_lifecycle_transition_t rcl_transition_shutdown;
extern const rcl_lifecycle_transition_t rcl_transition_activate; extern const rcl_lifecycle_transition_t rcl_transition_activate;
extern const rcl_lifecycle_transition_t rcl_transition_deactivate; extern const rcl_lifecycle_transition_t rcl_transition_deactivate;
#if __cplusplus #ifdef __cplusplus
} }
#endif // extern "C" #endif // extern "C"

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#if __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
@ -197,6 +197,6 @@ rcl_lifecycle_get_transitions(
return NULL; return NULL;
} }
#if __cplusplus #ifdef __cplusplus
} }
#endif #endif