xtensor-python icon indicating copy to clipboard operation
xtensor-python copied to clipboard

ignore unused parameter 'buf' warning

Open peter-urban opened this issue 2 years ago • 1 comments

I included <xtensor-python/xtensor_type_caster_base.hpp> into my code to let pybind11 automatically convert xtensor xarrays to numpy arrays.

However I get two "-wunused-parameter warnings" which seem to be straightforward to fix :-)

peter-urban avatar Sep 20 '22 14:09 peter-urban

Not sure, but the appveyor fail seems to be unrelated to my pull request?

peter-urban avatar Sep 20 '22 14:09 peter-urban

Thanks! You could also just remove the name buf from the argument. Is there any reason to keep it?

tdegeus avatar Mar 02 '23 16:03 tdegeus

I don't understand the code well enough to propose such a change.

To me this looks like a dummy function (just just returns true) to implement a sort of interface (but I don't know which one). Removing the variable could thus break this interface.

That said: If you have a better understanding of the code-base and you say that we can remove the argument, it is of cause not problem for me to adapt the PR :-)

peter-urban avatar Mar 08 '23 13:03 peter-urban

Tanks!

tdegeus avatar Mar 10 '23 09:03 tdegeus