EAIBOT / ydlidar

The driver of ydlidar for ROS on the linux !
101 stars 61 forks source link

compilation warnings. #24

Open mbriday opened 5 years ago

mbriday commented 5 years ago

Hi, There are warnings during the compilation (gcc 7.4) in file ydlidar/sdk/include/Console.h:

/home/mik/catkin_ws/src/ydlidar/sdk/include/Console.h: In member function ‘void ydlidar::Console::show(const char*, ...)’:
/home/mik/catkin_ws/src/ydlidar/sdk/include/Console.h:40:20: warning: format not a string literal and no format arguments [-Wformat-security]
         printf (out);

It appears 5 times (line 40, 53, 69, 85 ad 104). It can easily be fixed, using:

      printf ("%s",out);

instead of the direct printf(out) line.

regards, Mik