Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress unused parameter warnings #459

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/test-osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
brew install boost
python -m pip install --upgrade pip
python -m pip install setuptools faber
boostDir=/opt/homebrew/Cellar/boost/1.86.0
[[ -d $boostDir ]] || boostDir=/opt/homebrew/Cellar/boost/1.86.0_2
echo "boostDir=$boostDir" >> "$GITHUB_ENV"
- name: build
run: |
python --version
Expand All @@ -32,15 +35,15 @@ jobs:
faber -v
sed -e "s/\$PYTHON/python/g" .ci/faber > ~/.faber
faber \
--with-boost-include=/opt/homebrew/Cellar/boost/1.86.0/include \
--with-boost-include=$boostDir/include \
--builddir=build \
cxx.name=${{ matrix.cxx }} \
cxxflags=-std=${{ matrix.std }} \
-j`sysctl -n hw.ncpu`
- name: test
run: |
faber \
--with-boost-include=/opt/homebrew/Cellar/boost/1.86.0/include \
--with-boost-include=$boostDir/include \
--builddir=build\
cxx.name=${{ matrix.cxx }} \
cxxflags=-std=${{ matrix.std }} \
Expand Down
2 changes: 1 addition & 1 deletion include/boost/python/detail/defaults_def.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ namespace detail
NameSpaceT& name_space
, char const* name
, Func f
, keyword_range const& kw // ignored
, keyword_range const&
, CallPolicies const& policies
, char const* doc
, module*
Expand Down
2 changes: 1 addition & 1 deletion include/boost/python/numpy/ndarray.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ ndarray from_data_impl(void * data,
Container strides,
object const & owner,
bool writeable,
typename boost::enable_if< boost::python::detail::is_integral<typename Container::value_type> >::type * enabled = NULL)
typename boost::enable_if< boost::python::detail::is_integral<typename Container::value_type> >::type * = NULL)
{
std::vector<Py_intptr_t> shape_(shape.begin(),shape.end());
std::vector<Py_intptr_t> strides_(strides.begin(), strides.end());
Expand Down
2 changes: 2 additions & 0 deletions src/object/function.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <boost/python/detail/none.hpp>
#include <boost/mpl/vector/vector10.hpp>

#include <boost/core/ignore_unused.hpp>
#include <boost/bind/bind.hpp>

#include <algorithm>
Expand Down Expand Up @@ -628,6 +629,7 @@ extern "C"
function_descr_get(PyObject *func, PyObject *obj, PyObject *type_)
{
#if PY_VERSION_HEX >= 0x03000000
boost::ignore_unused(type_);
// The implement is different in Python 3 because of the removal of unbound method
if (obj == Py_None || obj == NULL) {
Py_INCREF(func);
Expand Down
2 changes: 1 addition & 1 deletion src/object/function_doc_signature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ namespace boost { namespace python { namespace objects {
return res;
}

str function_doc_signature_generator::raw_function_pretty_signature(function const *f, size_t n_overloads, bool cpp_types )
str function_doc_signature_generator::raw_function_pretty_signature(function const *f, size_t /*n_overloads*/, bool /*cpp_types*/ )
{
str res("object");

Expand Down
Loading