Slamtec / rplidar_ros

BSD 2-Clause "Simplified" License
497 stars 532 forks source link

Fix Compilation error (narrowing conversion) #101

Closed Babak-SSH closed 1 year ago

Babak-SSH commented 1 year ago

As happened in #85, I got this error building rplidar_ros from sources: /home/pi/catkin_ws/src/rplidar_ros/sdk/src/sl_lidar_driver.cpp:556:34: error: narrowing conversion of ‘rp::hal::Event::EVENT_TIMEOUT’ from ‘int’ to ‘long unsigned int’ [-Wnarrowing] 556 | case rp::hal::Event::EVENT_TIMEOUT: This PR contains a simple fix by changing the return types and variables related to events from unsigned long to int in event.h file.