Skip to content

Commit 46984d7

Browse files
Merge pull request #4191 from kunaltyagi/io_ignore_vtk
[IO] Tell compiler to not worry about variables unused when VTK is absent
2 parents 74be59e + c1af381 commit 46984d7

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

io/src/image_grabber.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
#include <pcl/io/image_grabber.h>
4040
#include <pcl/io/lzf_image_io.h>
4141
#include <pcl/io/pcd_io.h>
42+
#include <pcl/common/utils.h>
4243
#include <pcl/memory.h>
4344
#include <pcl/pcl_config.h>
4445
#include <pcl/pcl_macros.h>
@@ -630,10 +631,13 @@ pcl::ImageGrabberBase::ImageGrabberImpl::getCloudVTK (std::size_t idx,
630631

631632
return (true);
632633
#else
633-
PCL_ERROR ("[pcl::ImageGrabber::loadNextCloudVTK] Attempted to read image files, but PCL was not built with VTK [no -DPCL_BUILT_WITH_VTK]. \n");
634-
return (false);
634+
pcl::utils::ignore(idx);
635+
pcl::utils::ignore(blob);
636+
pcl::utils::ignore(origin);
637+
pcl::utils::ignore(orientation);
638+
PCL_ERROR ("[pcl::ImageGrabber::loadNextCloudVTK] Attempted to read image files, but PCL was not built with VTK [no -DPCL_BUILT_WITH_VTK]. \n");
639+
return false;
635640
#endif //PCL_BUILT_WITH_VTK
636-
637641
}
638642

639643
bool

0 commit comments

Comments
 (0)