fix warning

This commit is contained in:
wmayer
2017-11-14 21:47:56 +01:00
parent 04ea295280
commit 8c7bb0cd55
4 changed files with 7 additions and 8 deletions

View File

@@ -473,10 +473,10 @@ namespace KDTree
}
const_iterator
find_within_range_iterative(const_reference __a, const_reference __b)
{
return const_iterator(begin());
}
find_within_range_iterative(const_reference /*__a*/, const_reference /*__b*/)
{
return const_iterator(begin());
}
template <typename SearchVal, typename _OutputIterator>
_OutputIterator

View File

@@ -633,7 +633,7 @@ void QuantityPy::setFormat(Py::Tuple arg)
throw Py::ValueError("Invalid format character");
bool ok;
fmt.format = Base::QuantityFormat::toFormat(fmtstr.front(), &ok);
fmt.format = Base::QuantityFormat::toFormat(fmtstr[0], &ok);
if (!ok)
throw Py::ValueError("Invalid format character");

View File

@@ -153,7 +153,6 @@ std::string Base::Tools::escapedUnicodeFromUtf8(const char *s)
return escapedstr;
PyObject* escaped = PyUnicode_AsUnicodeEscapeString(unicode);
if (escaped) {
#if PY_MAJOR_VERSION >= 3
escapedstr = std::string(PyBytes_AsString(escaped));
@@ -162,8 +161,8 @@ std::string Base::Tools::escapedUnicodeFromUtf8(const char *s)
#endif
Py_DECREF(escaped);
}
Py_DECREF(unicode);
Py_DECREF(unicode);
return escapedstr;
}

View File

@@ -209,7 +209,7 @@ PyObject* UnitsApi::sSchemaTranslate(PyObject * /*self*/, PyObject *args,PyObjec
quant = *static_cast<Base::QuantityPy*>(q)->getQuantityPtr();
std::unique_ptr<UnitsSchema> schema(createSchema(static_cast<UnitSystem>(index)));
if (!schema) {
if (!schema.get()) {
PyErr_SetString(PyExc_ValueError, "invalid schema value");
return 0;
}