Skip to content

BUG: Signed to Unsigned casting. I cannot build PCL in Windows #6110

@tricostume

Description

@tricostume

Hi I cannot build PCL in windows (nor Debug or Release)
The problem I get seems to come from this line.

pcl\segmentation\include\pcl/segmentation/extract_labeled_clusters.h(190): error C2397: conversion from 'int' to 'unsigned int' requires a narrowing conversion

I guess this implicit casting from int to unsigned int is dangerous, you intend there to have the maximum number of a signed type copied into an unsigned one (overflow somehow?) and still expect to have a max_label_ ...

unsigned int max_label_{std::numeric_limits<int>::max()};

I created a PR: Could we push ASAP?
#6111

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions