pidl: Fix unsigned integer comparison warning
[kai/samba-autobuild/.git] / pidl / lib / Parse / Pidl / Samba4 / Python.pm
index 01dda41e63da0ac79283b417314e5ce2b421c3a7..1ef64db14ee72dae6c9934589aeb7d518285c1d2 100644 (file)
@@ -1726,7 +1726,7 @@ sub ConvertObjectFromPythonData($$$$$$;$$)
                $self->indent;
                $self->pidl("long test_var;");
                $self->pidl("test_var = PyInt_AsLong($cvar);");
-               $self->pidl("if (test_var < 0 || test_var > uint_max) {");
+               $self->pidl("if (test_var < 0 || (unsigned long long)test_var > uint_max) {");
                $self->indent;
                $self->pidl("PyErr_Format(PyExc_OverflowError, \"Expected type %s or %s within range 0 - %llu, got %ld\",\\");
                $self->pidl("  PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);");