[issue5933] fix gcc -Wextra warnings (compare signed/unsigned)
Mark Dickinson
report at bugs.python.org
Fri May 8 23:15:30 CEST 2009
Mark Dickinson <dickinsm at gmail.com> added the comment:
Applied in r72479, r72481, r72482, r72483.
As a side note, I'm not 100% convinced of the correctness of the resource_setrlimit code. If rlim_t is smaller than an unsigned long then input values might be wrapped to a smaller
value (by the implicit long -> rlim_t conversion) when they should be signaling
OverflowError instead. Perhaps there should be a bunch of PySAFE_DOWNCASTs here?
Or maybe rlim_t is never smaller than a long in practice.
About RLIM_INFINITY: I can't find it documented anywhere that RLIM_INFINITY is (rlim_t)-1,
though I dare say that's true on many platforms. Still, it doesn't seem like a safe
assumption.
----------
resolution: -> fixed
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5933>
_______________________________________
More information about the Python-bugs-list
mailing list