Commit 083d1f9f authored by Mark Dickinson's avatar Mark Dickinson

Issue #5933: Fix gcc -Wextra compiler warnings (and remove some

trailing whitespace).
parent fd1ee7a8
......@@ -159,20 +159,20 @@ resource_setrlimit(PyObject *self, PyObject *args)
#if !defined(HAVE_LARGEFILE_SUPPORT)
rl.rlim_cur = PyInt_AsLong(curobj);
if (rl.rlim_cur == -1 && PyErr_Occurred())
if (rl.rlim_cur == (rlim_t)-1 && PyErr_Occurred())
return NULL;
rl.rlim_max = PyInt_AsLong(maxobj);
if (rl.rlim_max == -1 && PyErr_Occurred())
if (rl.rlim_max == (rlim_t)-1 && PyErr_Occurred())
return NULL;
#else
/* The limits are probably bigger than a long */
rl.rlim_cur = PyLong_Check(curobj) ?
PyLong_AsLongLong(curobj) : PyInt_AsLong(curobj);
if (rl.rlim_cur == -1 && PyErr_Occurred())
if (rl.rlim_cur == (rlim_t)-1 && PyErr_Occurred())
return NULL;
rl.rlim_max = PyLong_Check(maxobj) ?
PyLong_AsLongLong(maxobj) : PyInt_AsLong(maxobj);
if (rl.rlim_max == -1 && PyErr_Occurred())
if (rl.rlim_max == (rlim_t)-1 && PyErr_Occurred())
return NULL;
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment