Slamtec / rplidar_sdk

Open source SDK for Slamtec RPLIDAR series products
BSD 2-Clause "Simplified" License
425 stars 253 forks source link

Fix compiling wiwh gcc >= 11 on linux #64

Closed loreucci closed 1 year ago

loreucci commented 2 years ago

As Core Issue 1512 has been implemented in gcc 11 (see here), it is no longer possible to do ordered comparison between pointers and zero.

This fix changes the ordered comparison into an equality with NULL, allowing gcc 11 to compile the sdk.

Tested with gcc 11.1

mceisel commented 1 year ago

Confirming this fixes g++ version 11.0+

deyouslamtec commented 1 year ago

has Merged PR #98 with the same content