[issue5933] fix gcc -Wextra warnings (compare signed/unsigned)

STINNER Victor report at bugs.python.org
Wed May 6 10:17:38 CEST 2009


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

> For the second, I don't understand why you want to
> compare the return result with RLIM_INFINITY:  PyInt_AsLong
> returns -1 to signal failure;  is there some guarantee that
> RLIM_INFINITY == -1 if it's defined?

rlim_t is an unsigned type. The idea of sign_warning_resource.patch 
was to make gcc quiet about signed/unsigned comparaisons.

RLIM_INFINITY is defined as (rlim_t)-1. But it looks that it's not 
clear, so I wrote another patch to fix the warnings.

----------
Added file: http://bugs.python.org/file13904/sign_warning_resource-2.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5933>
_______________________________________


More information about the Python-bugs-list mailing list