mirror of
https://github.com/pybind/pybind11.git
synced 2025-01-19 01:15:52 +00:00
Fix a couple of warnings
- Conversion warning on clang: 'long' to 'size_t' - Unused variable warning on MSVC
This commit is contained in:
parent
38d8b8cfe2
commit
f2b36c2ed2
@ -135,7 +135,7 @@ void init_issues(py::module &m) {
|
||||
try {
|
||||
py::class_<Placeholder>(m2, "Placeholder");
|
||||
throw std::logic_error("Expected an exception!");
|
||||
} catch (std::runtime_error &e) {
|
||||
} catch (std::runtime_error &) {
|
||||
/* All good */
|
||||
}
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ protected:
|
||||
const T *it = ptr;
|
||||
while (*it++ != (T) 0)
|
||||
;
|
||||
return it - ptr;
|
||||
return static_cast<size_t>(it - ptr);
|
||||
}
|
||||
|
||||
const std::type_info **m_types = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user