This is an automated email from the git hooks/post-receive script.
nsoffer pushed a commit to branch master
in repository sanlock.
The following commit(s) were added to refs/heads/master by this push:
new 9b2e7cf python: Fix comparison between signed and unsigned integer
9b2e7cf is described below
commit 9b2e7cfc420b19cff0000538806de85d8f771f79
Author: Nir Soffer <nsoffer(a)redhat.com>
AuthorDate: Tue May 21 04:26:20 2019 +0300
python: Fix comparison between signed and unsigned integer
Fix these warnings, seen in python 3 builds on Travis:
sanlock.c:1002:23: warning: comparison between signed and unsigned integer expressions
[-Wsign-compare]
if (res->lver == -1) {
^
sanlock.c:1118:23: warning: comparison between signed and unsigned integer expressions
[-Wsign-compare]
if (res->lver == -1) {
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
python/sanlock.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/python/sanlock.c b/python/sanlock.c
index b412b6a..5d228e8 100644
--- a/python/sanlock.c
+++ b/python/sanlock.c
@@ -999,7 +999,7 @@ py_acquire(PyObject *self __unused, PyObject *args, PyObject *keywds)
if (version != Py_None) {
res->flags |= SANLK_RES_LVER;
res->lver = pyinteger_as_unsigned_long_long_mask(version);
- if (res->lver == -1) {
+ if (res->lver == (uint64_t)-1) {
__set_exception(EINVAL, "Unable to convert the version value");
goto exit_fail;
}
@@ -1115,7 +1115,7 @@ py_request(PyObject *self __unused, PyObject *args, PyObject
*keywds)
} else {
res->flags |= SANLK_RES_LVER;
res->lver = pyinteger_as_unsigned_long_long_mask(version);
- if (res->lver == -1) {
+ if (res->lver == (uint64_t)-1) {
__set_exception(EINVAL, "Unable to convert the version value");
goto exit_fail;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
Show replies by date