Python compiler warns about use of 0xffffffff
[email protected] (Aaron M. Ucko)
| Newsgroups | gmane.comp.mobile.bitpim.devel |
|---|---|
| Message-ID | <[email protected]> |
As reported online at http://bugs.debian.org/358023 , BitPim uses the
hex literal 0xFFFFFFFF in a couple of files, triggering compile-time
FutureWarnings on 32-bit systems:
/usr/share/bitpim/com_lgpm225.py:1065: FutureWarning: hex/oct constants
> sys.maxint will return positive values in Python 2.4 and up
serial1=helper.getserial(entry.get('serials', []), self.serialsname,
data['uniqueserial'], 'serial1', 0xFFFFFFFF)
/usr/share/bitpim/com_sanyo.py:976: FutureWarning: hex/oct constants >
sys.maxint will return positive values in Python 2.4 and up
if res.entry.alarm==0xffffffff:
(I don't see such warnings on the x86_64 box I use for development,
where sys.maxint seems to be 2^63 - 1 and 0xFFFFFFFF is therefore
already positive.)
Could somebody please tweak the code to avoid such warnings?
Thanks!
--
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
Finger [email protected] (NOT a valid e-mail address) for more info.
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642