From 8612123c0c57db3dcb4e7138e299ab0f8f5e4ebb Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Mon, 23 Nov 2015 14:17:05 +0000 Subject: [PATCH 4/4] pysss_nss_idmap: Fix warning Wsign-compare We get id from python with type long. We need to checked if we can safely cast to unsigned 32 bit integer. src/python/pysss_nss_idmap.c: In function 'do_getsidbyid': src/python/pysss_nss_idmap.c:155:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (id < 0 || id > UINT32_MAX) { ^ --- src/python/pysss_nss_idmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/pysss_nss_idmap.c b/src/python/pysss_nss_idmap.c index 36d66f4..ccfdc49 100644 --- a/src/python/pysss_nss_idmap.c +++ b/src/python/pysss_nss_idmap.c @@ -152,7 +152,7 @@ static int do_getsidbyid(PyObject *py_result, PyObject *py_id) } } - if (id < 0 || id > UINT32_MAX) { + if (id < 0 || id > (long)UINT32_MAX) { return EINVAL; } -- 2.6.3