Skip to content

Commit eebf94a

Browse files
authored
Merge pull request #2082 from SergioRAgostinho/more-warnings
Suppress the final set of warnings in pcl apps
2 parents b0dcfb5 + ef11618 commit eebf94a

File tree

10 files changed

+18
-18
lines changed

10 files changed

+18
-18
lines changed

apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pipeline/impl/global_nn_recognizer_cvfh.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ template<template<class > class Distance, typename PointInT, typename FeatureT>
295295
nearestKSearch (single_categories_index_[it->second], histogram, NN_, indices, distances);
296296
//gather NN-search results
297297
double score = 0;
298-
for (size_t i = 0; i < NN_; ++i)
298+
for (size_t i = 0; i < (size_t) NN_; ++i)
299299
{
300300
score = distances[0][i];
301301
index_score is;

apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/utils/metrics.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ namespace Metrics
121121
*/
122122
template<typename U, typename V>
123123
inline ResultType
124-
accum_dist (const U& a, const V& b, int dim) const
124+
accum_dist (const U& a, const V& b, int) const
125125
{
126126
//printf("New code being used, accum_dist\n");
127127
ResultType min0;

apps/3d_rec_framework/tools/apps/src/local_recognition_mian_dataset.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ template<template<class > class DistT, typename PointT, typename FeatureT>
117117
{
118118
std::cout << files[i] << std::endl;
119119
if (scene != -1)
120-
if (scene != i)
120+
if ((size_t) scene != i)
121121
continue;
122122

123123
std::stringstream file;

apps/cloud_composer/include/pcl/apps/cloud_composer/tools/impl/organized_segmentation.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105

106106
boost::shared_ptr<std::map<uint32_t, bool> > plane_labels = boost::make_shared<std::map<uint32_t, bool> > ();
107107
for (size_t i = 0; i < label_indices.size (); ++i)
108-
(*plane_labels)[i] = (label_indices[i].indices.size () > min_plane_size);
108+
(*plane_labels)[i] = (label_indices[i].indices.size () > (size_t) min_plane_size);
109109
typename PointCloud<PointT>::CloudVectorType clusters;
110110

111111
typename EuclideanClusterComparator<PointT, pcl::Label>::Ptr euclidean_cluster_comparator = boost::make_shared <EuclideanClusterComparator<PointT, pcl::Label> > ();
@@ -123,7 +123,7 @@
123123
pcl::IndicesPtr extracted_indices (new std::vector<int> ());
124124
for (size_t i = 0; i < euclidean_label_indices.size (); i++)
125125
{
126-
if (euclidean_label_indices[i].indices.size () >= min_cluster_size)
126+
if (euclidean_label_indices[i].indices.size () >= (size_t) min_cluster_size)
127127
{
128128
typename PointCloud<PointT>::Ptr cluster = boost::shared_ptr<PointCloud<PointT> > (new PointCloud<PointT>);
129129
pcl::copyPointCloud (*input_cloud,euclidean_label_indices[i].indices,*cluster);
@@ -138,7 +138,7 @@
138138

139139
for (size_t i = 0; i < label_indices.size (); i++)
140140
{
141-
if (label_indices[i].indices.size () >= min_plane_size)
141+
if (label_indices[i].indices.size () >= (size_t) min_plane_size)
142142
{
143143
typename PointCloud<PointT>::Ptr plane = boost::shared_ptr<PointCloud<PointT> > (new PointCloud<PointT>);
144144
pcl::copyPointCloud (*input_cloud,label_indices[i].indices,*plane);

apps/cloud_composer/tools/organized_segmentation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pcl::cloud_composer::OrganizedSegmentationTool::performAction (ConstItemList inp
3131
{
3232
if (type != PointTypeFlags::NONE)
3333
{
34-
switch (type)
34+
switch ((uint8_t) type)
3535
{
3636
case (PointTypeFlags::XYZ):
3737
return this->performTemplatedAction<pcl::PointXYZ> (input_data);

apps/cloud_composer/tools/supervoxels.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pcl::cloud_composer::SupervoxelsTool::performAction (ConstItemList input_data, P
2929
{
3030
if (type != PointTypeFlags::NONE)
3131
{
32-
switch (type)
32+
switch ((uint8_t) type)
3333
{
3434
case (PointTypeFlags::XYZ | PointTypeFlags::RGB):
3535
return this->performTemplatedAction<pcl::PointXYZRGB> (input_data);

apps/in_hand_scanner/src/icp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ pcl::ihs::ICP::findTransformation (const MeshConstPtr& mesh_model,
244244
// Check the distance threshold
245245
if (squared_distance [0] < squared_distance_threshold)
246246
{
247-
if (index [0] >= cloud_model_selected->size ())
247+
if ((size_t) index [0] >= cloud_model_selected->size ())
248248
{
249249
std::cerr << "ERROR in icp.cpp: Segfault!\n";
250250
std::cerr << " Trying to access index " << index [0] << " >= " << cloud_model_selected->size () << std::endl;

apps/in_hand_scanner/src/mesh_processing.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ pcl::ihs::MeshProcessing::processBoundary (Mesh& mesh, const std::vector <HalfEd
9393
// \ / //
9494
// 5 //
9595

96-
for (int i=0; i<boundary.size (); ++i)
96+
for (size_t i=0; i<boundary.size (); ++i)
9797
{
9898
// The vertices on the boundary
9999
vi_a = mesh.getOriginatingVertexIndex (boundary [i]);

apps/modeler/src/parameter_dialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ pcl::modeler::Parameter* pcl::modeler::ParameterDelegate::getCurrentParameter(co
156156
std::map<std::string, Parameter*>::iterator currentParameter = parameter_map_.begin();
157157

158158
size_t currentRow = 0;
159-
while(currentRow < index.row() && currentParameter != parameter_map_.end()) {
159+
while(currentRow < (size_t) index.row() && currentParameter != parameter_map_.end()) {
160160
++ currentParameter;
161161
++ currentRow;
162162
}

tracking/include/pcl/tracking/impl/pyramidal_klt.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,8 @@ pcl::tracking::PyramidalKLTTracker<PointInT, IntensityT>::track (const PointClou
512512
iprev_point[0] = floor (prev_pt[0]);
513513
iprev_point[1] = floor (prev_pt[1]);
514514

515-
if (iprev_point[0] < -track_width_ || iprev_point[0] >= grad_x.width ||
516-
iprev_point[1] < -track_height_ || iprev_point[1] >= grad_y.height)
515+
if (iprev_point[0] < -track_width_ || (uint32_t) iprev_point[0] >= grad_x.width ||
516+
iprev_point[1] < -track_height_ || (uint32_t) iprev_point[1] >= grad_y.height)
517517
{
518518
if (level == 0)
519519
status [ptidx] = -1;
@@ -544,13 +544,13 @@ pcl::tracking::PyramidalKLTTracker<PointInT, IntensityT>::track (const PointClou
544544
next_pt -= half_win;
545545

546546
Eigen::Array2f prev_delta;
547-
for (int j = 0; j < max_iterations_; j++)
547+
for (unsigned int j = 0; j < max_iterations_; j++)
548548
{
549549
inext_pt[0] = floor (next_pt[0]);
550550
inext_pt[1] = floor (next_pt[1]);
551551

552-
if (inext_pt[0] < -track_width_ || inext_pt[0] >= next.width ||
553-
inext_pt[1] < -track_height_ || inext_pt[1] >= next.height)
552+
if (inext_pt[0] < -track_width_ || (uint32_t) inext_pt[0] >= next.width ||
553+
inext_pt[1] < -track_height_ || (uint32_t) inext_pt[1] >= next.height)
554554
{
555555
if (level == 0)
556556
status[ptidx] = -1;
@@ -595,8 +595,8 @@ pcl::tracking::PyramidalKLTTracker<PointInT, IntensityT>::track (const PointClou
595595
inext_point[0] = floor (next_point[0]);
596596
inext_point[1] = floor (next_point[1]);
597597

598-
if (inext_point[0] < -track_width_ || inext_point[0] >= next.width ||
599-
inext_point[1] < -track_height_ || inext_point[1] >= next.height)
598+
if (inext_point[0] < -track_width_ || (uint32_t) inext_point[0] >= next.width ||
599+
inext_point[1] < -track_height_ || (uint32_t) inext_point[1] >= next.height)
600600
{
601601
status[ptidx] = -1;
602602
continue;

0 commit comments

Comments
 (0)