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

Add static cast to avoid narrowing error #66

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fmrico
Copy link

@fmrico fmrico commented Nov 18, 2021

Dear maintainers,

As happened to @sai5555 in #56, I got this error building rplidar_ros from sources (Noetic, g++ (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0):

/home/fmrico/ros/ros1/robots_ws/src/ThirdParty/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 for this.

I hope it helps

Signed-off-by: Francisco Martín Rico <[email protected]>
@fmrico fmrico force-pushed the fixes_narrow_error branch from 4aaa4fe to b3b5fe1 Compare November 18, 2021 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant