PointCloudLibrary/pcl

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

开放

#949 创建于 2014年10月9日

 (1 条评论) (0 个反应) (0 位负责人)C++ (4,506 个派生)batch import
effort: lowgood first issuekind: todo

仓库指标

星标
 (9,023 个星标)
PR 合并指标
 (平均合并 8天 7小时) (30 天内合并 3 个 PR)

描述

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.

贡献者指南