Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix excessive warnings reported by MSVC #3964

Merged
merged 3 commits into from
Apr 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions common/include/pcl/point_cloud.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,15 @@ namespace pcl
* \param[in] pc the cloud to copy into this
* \todo Erase once mapping_ is removed.
*/
// Ignore unknown pragma warning on MSVC (4996)
#pragma warning(push)
#pragma warning(disable: 4068)
// Ignore deprecated warning on clang compilers
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
PointCloud (const PointCloud<PointT> &pc) = default;
#pragma clang diagnostic pop
#pragma warning(pop)

/** \brief Copy constructor from point cloud subset
* \param[in] pc the cloud to copy into this
Expand Down
4 changes: 4 additions & 0 deletions test/common/test_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ TEST (PCL, copyPointCloud)
}

///////////////////////////////////////////////////////////////////////////////////////////
// Ignore unknown pragma warning on MSVC (4996)
#pragma warning(push)
#pragma warning(disable: 4068)
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#pragma GCC diagnostic push
TEST (PCL, concatenatePointCloud)
Expand Down Expand Up @@ -317,6 +320,7 @@ TEST (PCL, concatenatePointCloud)
}
}
#pragma GCC diagnostic pop
#pragma warning(pop)

///////////////////////////////////////////////////////////////////////////////////////////
TEST (PCL, concatenatePointCloud2)
Expand Down