forked from pool/python3-pyside2
34 lines
1.4 KiB
Diff
34 lines
1.4 KiB
Diff
From 70d241713ae375124eaabdd928fcdfd034822c6e Mon Sep 17 00:00:00 2001
|
|
From: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
Date: Wed, 29 Aug 2018 16:09:01 +0200
|
|
Subject: shiboken/pep384: Avoid warning by literal comparison
|
|
|
|
Even though we are certain of the comparison,
|
|
better to get rid of the warnings.
|
|
|
|
Change-Id: Iafa51b4c59c2315b24fc9092d18792f0c9297553
|
|
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
---
|
|
sources/shiboken2/libshiboken/pep384impl.cpp | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
(limited to 'sources/shiboken2/libshiboken/pep384impl.cpp')
|
|
|
|
diff --git a/sources/shiboken2/libshiboken/pep384impl.cpp b/sources/shiboken2/libshiboken/pep384impl.cpp
|
|
index 25a3b625..4481f1cd 100644
|
|
--- a/sources/shiboken2/libshiboken/pep384impl.cpp
|
|
+++ b/sources/shiboken2/libshiboken/pep384impl.cpp
|
|
@@ -130,7 +130,7 @@ check_PyTypeObject_valid(void)
|
|
long probe_tp_dictoffset = PyLong_AsLong(d);
|
|
PyObject *probe_tp_mro = PyObject_GetAttrString(obtype, "__mro__");
|
|
if (false
|
|
- || probe_tp_name != check->tp_name
|
|
+ || (probe_tp_name - check->tp_name) != 0 // to avoid warning
|
|
|| probe_tp_basicsize != check->tp_basicsize
|
|
|| probe_tp_call != check->tp_call
|
|
|| probe_tp_str != check->tp_str
|
|
--
|
|
cgit v1.2.1
|
|
|