aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/libpyside/feature_select.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <[email protected]>2023-09-18 10:11:13 +0200
committerFriedemann Kleint <[email protected]>2023-09-20 13:44:47 +0200
commitb8f5e535dab255af228830c6d548ce730a7603d5 (patch)
tree82fe89344b91a4bf82180efff9734dc3429ef4cc /sources/pyside6/libpyside/feature_select.cpp
parent2cc7ded80caa506263ba2c9fd87db76dae71956a (diff)
libshiboken/libpyside: Fix some static analysis warnings
- nullptr - narrowing integer conversions - else after return - Use auto - Missing move special functions Pick-to: 6.6 6.5 Change-Id: Ib872481a46c8bb17592cdc1778ab3c4d9598c753 Reviewed-by: Shyamnath Premnadh <[email protected]>
Diffstat (limited to 'sources/pyside6/libpyside/feature_select.cpp')
-rw-r--r--sources/pyside6/libpyside/feature_select.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/pyside6/libpyside/feature_select.cpp b/sources/pyside6/libpyside/feature_select.cpp
index 8c4c4bae1..6d0389914 100644
--- a/sources/pyside6/libpyside/feature_select.cpp
+++ b/sources/pyside6/libpyside/feature_select.cpp
@@ -611,9 +611,9 @@ static QByteArrayList GetPropertyStringsMro(PyTypeObject *type)
auto res = QByteArrayList();
PyObject *mro = type->tp_mro;
- Py_ssize_t idx, n = PyTuple_GET_SIZE(mro);
+ const Py_ssize_t n = PyTuple_GET_SIZE(mro);
// We leave 'Shiboken.Object' and 'object' alone, therefore "n - 2".
- for (idx = 0; idx < n - 2; idx++) {
+ for (Py_ssize_t idx = 0; idx < n - 2; idx++) {
auto *subType = reinterpret_cast<PyTypeObject *>(PyTuple_GET_ITEM(mro, idx));
auto props = SbkObjectType_GetPropertyStrings(subType);
if (props != nullptr)