boostorg / gil

Boost.GIL - Generic Image Library | Requires C++14 since Boost 1.80
https://boostorg.github.io/gil
Boost Software License 1.0
179 stars 163 forks source link

Suspicious warnings about unused variables #558

Closed mloskot closed 2 years ago

mloskot commented 3 years ago

These seem to be just some left-overs, but some may actually be unused by mistake. I'd appreciate if you could have a look @simmplecoder

test/core/rasterization/circle.cpp:22:20: warning: unused variable ‘r_squared’ [-Wunused-variable]
   22 |     std::ptrdiff_t r_squared = radius * radius;
      |                    ^~~~~~~~~
../../boost/gil/image_processing/hough_transform.hpp:90:16: warning: unused variable ‘width’ [-Wunused-variable]
   90 |     const auto width = input.width();
      |                ^~~~~
../../boost/gil/image_processing/hough_transform.hpp:91:16: warning: unused variable ‘height’ [-Wunused-variable]
   91 |     const auto height = input.height();
      |                ^~~~~~
../../boost/gil/image_processing/diffusion.hpp:155:14: warning: unused variable ‘first’ [-Wunused-variable]
  155 |         auto first = stencil.begin();
      |              ^~~~~
../../boost/gil/image_processing/diffusion.hpp:156:14: warning: unused variable ‘last’ [-Wunused-variable]
  156 |         auto last = stencil.end();
      |              ^~~~
striezel commented 2 years ago

@mloskot: Those warnings already have been removed in the following commits:

In other words: I believe this issue is resolved and can be closed.

mloskot commented 2 years ago

Nice, thanks!