Skip to content

Commit

Permalink
Merge pull request #2057 from SergioRAgostinho/io_warn
Browse files Browse the repository at this point in the history
Suppress control reaches end of non-void function in io.h
  • Loading branch information
taketwo authored Nov 8, 2017
2 parents 45cca31 + adf5304 commit 887fd4e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
16 changes: 7 additions & 9 deletions common/include/pcl/common/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,14 @@ namespace pcl
return (pcl::PCLPointField::INT8);
if (type == 'U')
return (pcl::PCLPointField::UINT8);
break;
break;

case 2:
if (type == 'I')
return (pcl::PCLPointField::INT16);
if (type == 'U')
return (pcl::PCLPointField::UINT16);
break;
break;

case 4:
if (type == 'I')
Expand All @@ -190,16 +190,14 @@ namespace pcl
return (pcl::PCLPointField::UINT32);
if (type == 'F')
return (pcl::PCLPointField::FLOAT32);
break;
break;

case 8:
return (pcl::PCLPointField::FLOAT64);

default:
break;

return (-1);
if (type == 'F')
return (pcl::PCLPointField::FLOAT64);
break;
}
return (-1);
}

/** \brief Obtains the type of the PCLPointField from a specific PCLPointField as a char
Expand Down
2 changes: 1 addition & 1 deletion test/io/test_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ TEST (PCL, ComplexPCDFileASCII)
EXPECT_EQ (blob.fields[1].name, "_");
EXPECT_EQ (blob.fields[1].offset, 4 * 33);
EXPECT_EQ (blob.fields[1].count, 10);
EXPECT_EQ (blob.fields[1].datatype, pcl::PCLPointField::FLOAT32);
EXPECT_EQ (blob.fields[1].datatype, (uint8_t) -1);

EXPECT_EQ (blob.fields[2].name, "x");
EXPECT_EQ (blob.fields[2].offset, 4 * 33 + 10 * 1);
Expand Down

0 comments on commit 887fd4e

Please sign in to comment.