f1tenth / vesc

Repository for the VESC Controller (ROS1 and ROS2)
BSD 3-Clause "New" or "Revised" License
51 stars 74 forks source link

Missing return value in vesc_driver::VescInterface::Impl::rxThread() #6

Closed shr-project closed 3 years ago

shr-project commented 3 years ago
vesc-driver/1.1.0-1-r0/git/src/vesc_interface.cpp: In member function 'void* vesc_driver::VescInterface::Impl::rxThread()':
vesc-driver/1.1.0-1-r0/git/src/vesc_interface.cpp:147:1: error: no return statement in function returning non-void [-Werror=return-type]

The fix isn't obvious to me after quick look at the source.

JWhitleyWork commented 3 years ago

This should use std::thread instead of pthread_create to create the thread. std::thread does not require that anything be returned from the thread function. Please test the changes I have made in #7.

shr-project commented 3 years ago

@JWhitleyWork I've build-tested the change from https://github.com/f1tenth/vesc/pull/7 and it builds OK. Thanks!