PointCloudLibrary / pcl

Point Cloud Library (PCL)
https://pointclouds.org/
Other
9.72k stars 4.6k forks source link

[PCL] Remove `exit` with return to error values #949

Open lepalom opened 9 years ago

lepalom commented 9 years ago

shlib-calls-exit usr/lib/x86_64-linux-gnu/libpcl_surface.so.1.7.2 shlib-calls-exit usr/lib/x86_64-linux-gnu/libpcl_tracking.so.1.7.2 shlib-calls-exit usr/lib/x86_64-linux-gnu/libpcl_common.so.1.7.2 shlib-calls-exit usr/lib/x86_64-linux-gnu/libpcl_segmentation.so.1.7.2

in this libraries lintian has complain. Looking the sources it's about call the exit function:

surface: src/3rdparty/opennurbs/zutil.c: exit(1); include/pcl/surface/3rdparty/poisson4/multi_grid_octree_data.hpp: exit( 0 ); include/pcl/surface/3rdparty/poisson4/multi_grid_octree_data.hpp: if( idx<0 ) fprintf( stderr , "[ERROR] Found unindexed edge %d (%d,%d)\n" , idx , minDepth , maxDepth ) , exit( 0 ); include/pcl/surface/3rdparty/poisson4/allocator.h: if(!mem){fprintf(stderr,"Failed to allocate memory\n");exit(0);} include/pcl/surface/3rdparty/poisson4/sparse_matrix.hpp: if( count>_maxEntriesPerRow ) fprintf( stderr , "[ERROR] Cannot set row size on contiguous matrix: %d<=%d\n" , count , _maxEntriesPerRow ) , exit( 0 ); include/pcl/surface/3rdparty/poisson4/octree_poisson.hpp: exit(0); include/pcl/surface/3rdparty/poisson4/octree_poisson.hpp: exit( 0 ); include/pcl/surface/3rdparty/poisson4/octree_poisson.hpp: if( d<minDepth ) fprintf( stderr , "[ERROR] Node depth lower than min-depth: %d < %d\n" , d , minDepth ) , exit( 0 ); include/pcl/surface/3rdparty/poisson4/bspline_data.hpp: exit( 0 );

because the poisson and zutil code.

tracking: include/pcl/tracking/impl/normal_coherence.hpp: exit (1);

common: src/fft/kiss_fftr.c: exit(1); src/fft/kiss_fftr.c: exit (1);

segmentation: include/pcl/segmentation/impl/extract_clusters.hpp:/* @todo: fix the return value, make sure the exit is not needed anymore/ include/pcl/segmentation/impl/extract_clusters.hpp: exit(0);

Please fix/review this code for the next version.

Thanks.

stale[bot] commented 4 years ago

Marking this as stale due to 30 days of inactivity. It will be closed in 7 days if no further activity occurs.