xtensor-stack / xtensor-python

Python bindings for xtensor
BSD 3-Clause "New" or "Revised" License
345 stars 58 forks source link

ignore unused parameter 'buf' warning #283

Closed peter-urban closed 1 year ago

peter-urban commented 1 year ago

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 commented 1 year ago

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

tdegeus commented 1 year ago

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

peter-urban commented 1 year ago

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 :-)

tdegeus commented 1 year ago

Tanks!