diff --git a/include/pybind11/buffer_info.h b/include/pybind11/buffer_info.h index f8689babf..403034ed9 100644 --- a/include/pybind11/buffer_info.h +++ b/include/pybind11/buffer_info.h @@ -181,6 +181,7 @@ PYBIND11_NAMESPACE_BEGIN(detail) template struct compare_buffer_info { static bool compare(const buffer_info &b) { + // NOLINTNEXTLINE(bugprone-sizeof-expression) Needed for `PyObject *` return b.format == format_descriptor::format() && b.itemsize == (ssize_t) sizeof(T); } };