From 33f85a50243aed61919e11c4807ff2c323413c54 Mon Sep 17 00:00:00 2001 From: tumbili Date: Tue, 1 Dec 2015 15:01:15 +0100 Subject: [PATCH] fixed unused variable --- src/modules/simulator/simulator_mavlink.cpp | 12 ++++++------ src/platforms/posix/work_queue/hrt_thread.c | 3 +-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/modules/simulator/simulator_mavlink.cpp b/src/modules/simulator/simulator_mavlink.cpp index be4be9711e..12402b4632 100644 --- a/src/modules/simulator/simulator_mavlink.cpp +++ b/src/modules/simulator/simulator_mavlink.cpp @@ -358,12 +358,12 @@ void Simulator::send() fds[0].fd = _actuator_outputs_sub; fds[0].events = POLLIN; - int rv; + // set the threads name #ifdef __PX4_DARWIN - rv = pthread_setname_np("sim_send"); + pthread_setname_np("sim_send"); #else - rv = pthread_setname_np(pthread_self(), "sim_send"); + pthread_setname_np(pthread_self(), "sim_send"); #endif int pret; @@ -523,12 +523,12 @@ void Simulator::pollForMAVLinkMessages(bool publish) pthread_create(&sender_thread, &sender_thread_attr, Simulator::sending_trampoline, NULL); pthread_attr_destroy(&sender_thread_attr); - int rv; + // set the threads name #ifdef __PX4_DARWIN - rv = pthread_setname_np("sim_rcv"); + pthread_setname_np("sim_rcv"); #else - rv = pthread_setname_np(pthread_self(), "sim_rcv"); + pthread_setname_np(pthread_self(), "sim_rcv"); #endif // wait for new mavlink messages to arrive diff --git a/src/platforms/posix/work_queue/hrt_thread.c b/src/platforms/posix/work_queue/hrt_thread.c index ea185525ac..5199785d78 100644 --- a/src/platforms/posix/work_queue/hrt_thread.c +++ b/src/platforms/posix/work_queue/hrt_thread.c @@ -119,10 +119,9 @@ static void hrt_work_process() uint32_t remaining; uint32_t next; - int rv; // set the threads name #ifdef __PX4_DARWIN - rv = pthread_setname_np("HRT"); + pthread_setname_np("HRT"); #else // The Linux headers do not actually contain this //rv = pthread_setname_np(pthread_self(), "HRT");