praveen-palanisamy / multiple-object-tracking-lidar

C++ implementation to Detect, track and classify multiple objects using LIDAR scans or point cloud
MIT License
787 stars 229 forks source link

warning: statement will never be executed [-Wswitch-unreachable] #31

Closed aka-LJ closed 4 years ago

aka-LJ commented 4 years ago

Hello,

I have built and run the package without any error, but getting the warning message of the state will never be executed at the building stage.

My point cloud data contains invalid data and I used pcl::removeNaNFromPointCloud() to filter the invalid data.

However, I still don't get any msg published to the topic, not sure the package is not working because of the invalid data or the building process.

here is the warning :

Warnings << multi_object_tracking_lidar:make /home/lj/catkin_ws/logs/multi_object_tracking_lidar/build.make.065.log
In file included from /home/lj/catkin_ws/src/multiple-object-tracking-lidar/src/main.cpp:31:0: /usr/include/pcl-1.8/pcl/sample_consensus/model_types.h: In function ‘void __static_initialization_and_destruction_0(int, int)’: /usr/include/pcl-1.8/pcl/sample_consensus/model_types.h:99:3: warning: ‘pcl::SAC_SAMPLE_SIZE’ is deprecated: This map is deprecated and is kept only to prevent breaking existing user code. Starting from PCL 1.8.0 model sample size is a protected member of the SampleConsensusModel class [-Wdeprecated-declarations] SAC_SAMPLE_SIZE (sample_size_pairs, sample_size_pairs + sizeof (sample_size_pairs) / sizeof (SampleSizeModel)); ^~~~~~~ /usr/include/pcl-1.8/pcl/sample_consensus/model_types.h:99:3: note: declared here /home/lj/catkin_ws/src/multiple-object-tracking-lidar/src/main.cpp: In function ‘void cloud_cb(const PointCloud2ConstPtr&)’: /home/lj/catkin_ws/src/multiple-object-tracking-lidar/src/main.cpp:644:21: warning: statement will never be executed [-Wswitch-unreachable] cout<<"Inside the switch case\n";


cd /home/lj/catkin_ws/build/multi_object_tracking_lidar; catkin build --get-env multi_object_tracking_lidar | catkin env -si  /usr/bin/make --jobserver-fds=6,7 -j; cd -
..................................................................................................................................................................................................................
Finished  <<< multi_object_tracking_lidar                [ 16.6 seconds ]                                                                                                                                         
[build] Summary: All 20 packages succeeded!                                                                                                                                                                       
[build]   Ignored:   4 packages were skipped or are blacklisted.                                                                                                                                                  
[build]   Warnings:  1 packages succeeded with warnings.                                                                                                                                                          
[build]   Abandoned: None.                                                                                                                                                                                        
[build]   Failed:    None.                                                                                                                                                                                        
[build] Runtime: 19.9 seconds total. 
aka-LJ commented 4 years ago

just the count won't be executed, won't affect the switch case