mirror of
https://github.com/python/cpython.git
synced 2025-09-17 06:06:25 +00:00
Issue #5933: Fix gcc -Wextra compiler warnings (and remove some
trailing whitespace).
This commit is contained in:
parent
fd1ee7a8a0
commit
083d1f9f9a
1 changed files with 6 additions and 6 deletions
|
@ -159,20 +159,20 @@ resource_setrlimit(PyObject *self, PyObject *args)
|
||||||
|
|
||||||
#if !defined(HAVE_LARGEFILE_SUPPORT)
|
#if !defined(HAVE_LARGEFILE_SUPPORT)
|
||||||
rl.rlim_cur = PyInt_AsLong(curobj);
|
rl.rlim_cur = PyInt_AsLong(curobj);
|
||||||
if (rl.rlim_cur == -1 && PyErr_Occurred())
|
if (rl.rlim_cur == (rlim_t)-1 && PyErr_Occurred())
|
||||||
return NULL;
|
return NULL;
|
||||||
rl.rlim_max = PyInt_AsLong(maxobj);
|
rl.rlim_max = PyInt_AsLong(maxobj);
|
||||||
if (rl.rlim_max == -1 && PyErr_Occurred())
|
if (rl.rlim_max == (rlim_t)-1 && PyErr_Occurred())
|
||||||
return NULL;
|
return NULL;
|
||||||
#else
|
#else
|
||||||
/* The limits are probably bigger than a long */
|
/* The limits are probably bigger than a long */
|
||||||
rl.rlim_cur = PyLong_Check(curobj) ?
|
rl.rlim_cur = PyLong_Check(curobj) ?
|
||||||
PyLong_AsLongLong(curobj) : PyInt_AsLong(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;
|
return NULL;
|
||||||
rl.rlim_max = PyLong_Check(maxobj) ?
|
rl.rlim_max = PyLong_Check(maxobj) ?
|
||||||
PyLong_AsLongLong(maxobj) : PyInt_AsLong(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;
|
return NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue