diff options
author | Andreas Schneider <asn@samba.org> | 2018-12-12 20:58:23 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2018-12-13 05:00:20 +0100 |
commit | 57783d6295d1dcfcd4bd99951599c0765ae8c61b (patch) | |
tree | fef6baf02839fad2f4c0d4bd7685eec396dbc572 /pidl | |
parent | 5508c19c5cbcde13f1239e1e2f167bdaf894b8dc (diff) | |
download | samba-57783d6295d1dcfcd4bd99951599c0765ae8c61b.tar.gz |
pidl: Fix unsigned integer comparison warning
bin/default/librpc/gen_ndr/py_wkssvc.c:27344:33: warning:
comparison of integer expressions of different signedness: ‘long int’
and ‘long long unsigned int’ [-Wsign-compare] <--[gcc]
if (test_var < 0 || test_var > uint_max) {
^
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Dec 13 05:00:20 CET 2018 on sn-devel-144
Diffstat (limited to 'pidl')
-rw-r--r-- | pidl/lib/Parse/Pidl/Samba4/Python.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index 01dda41e63d..1ef64db14ee 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -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);"); |