Slamtec / rplidar_ros

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

pointer cast fix for (error: ordered comparison of pointer with integer zero) #92

Closed KLelkov closed 1 year ago

KLelkov commented 2 years ago

Found this bug when running at Ubuntu 21.10, same as @sai5555 https://github.com/Slamtec/rplidar_ros/issues/56#issue-929377173 The error: https://disk.yandex.ru/i/1A5TNNlLATezGA

can be fixed in the line 170 of rplidar_ros/sdk/src/arch/linux/net_socket.cpp return ((uintptr_t)ans)<=0?RESULT_OPERATION_FAIL:RESULT_OK;