Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add static cast to avoid narrowing error#66

Open
fmrico wants to merge 1 commit into
Slamtec:masterfrom
fmrico:fixes_narrow_error
Open

Add static cast to avoid narrowing error#66
fmrico wants to merge 1 commit into
Slamtec:masterfrom
fmrico:fixes_narrow_error

Conversation

@fmrico
Copy link
Copy Markdown

@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