Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix type conversion warnings #68

Merged
merged 1 commit into from
Jul 29, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions rclcpp/include/rclcpp/executor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ class Executor
}));
}
// Use the number of subscriptions to allocate memory in the handles
unsigned long number_of_subscriptions = subs.size();
size_t number_of_subscriptions = subs.size();
rmw_subscriptions_t subscriber_handles;
subscriber_handles.subscriber_count = number_of_subscriptions;
// TODO(wjwwood): Avoid redundant malloc's
Expand All @@ -303,7 +303,7 @@ class Executor
}

// Use the number of services to allocate memory in the handles
unsigned long number_of_services = services.size();
size_t number_of_services = services.size();
rmw_services_t service_handles;
service_handles.service_count = number_of_services;
service_handles.services =
Expand All @@ -321,7 +321,7 @@ class Executor
}

// Use the number of clients to allocate memory in the handles
unsigned long number_of_clients = clients.size();
size_t number_of_clients = clients.size();
rmw_clients_t client_handles;
client_handles.client_count = number_of_clients;
client_handles.clients =
Expand All @@ -341,8 +341,7 @@ class Executor
// Use the number of guard conditions to allocate memory in the handles
// Add 2 to the number for the ctrl-c guard cond and the executor's
size_t start_of_timer_guard_conds = 2;
unsigned long number_of_guard_conds =
timers.size() + start_of_timer_guard_conds;
size_t number_of_guard_conds = timers.size() + start_of_timer_guard_conds;
rmw_guard_conditions_t guard_condition_handles;
guard_condition_handles.guard_condition_count = number_of_guard_conds;
guard_condition_handles.guard_conditions =
Expand Down