diff --git a/examples/matrix_example.cpp b/examples/matrix_example.cpp index 915e583..669adb2 100644 --- a/examples/matrix_example.cpp +++ b/examples/matrix_example.cpp @@ -115,7 +115,7 @@ void kdtree_demo(const size_t nSamples, const size_t dim) << " out_dist_sqr=" << out_dists_sqr[i] << std::endl; } -int main(int argc, char** argv) +int main(int /*argc*/, char** /*argv*/) { // Randomize Seed // srand(static_cast(time(nullptr))); diff --git a/examples/utils.h b/examples/utils.h index 9427838..5c53588 100644 --- a/examples/utils.h +++ b/examples/utils.h @@ -182,6 +182,7 @@ struct PointCloud_Orient // "if/else's" are actually solved at compile time. inline T kdtree_get_pt(const size_t idx, const size_t dim = 0) const { + (void)dim; return pts[idx].theta; } diff --git a/include/nanoflann.hpp b/include/nanoflann.hpp index 58e2f32..339a194 100644 --- a/include/nanoflann.hpp +++ b/include/nanoflann.hpp @@ -1808,7 +1808,8 @@ class KDTreeSingleIndexAdaptor // Create a permutable array of indices to the input vectors. Base::size_ = dataset_.kdtree_get_point_count(); if (Base::vAcc_.size() != Base::size_) Base::vAcc_.resize(Base::size_); - for (Size i = 0; i < Base::size_; i++) Base::vAcc_[i] = i; + for (IndexType i = 0; i < static_cast(Base::size_); i++) + Base::vAcc_[i] = i; } void computeBoundingBox(BoundingBox& bbox)