Skip to content

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

@lepalom

Description

@lepalom

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort: lowRough estimate of time needed to fix/implement/solvegood first issueSkills/areas of expertise needed to tackle the issuekind: todoType of issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions