Martin v. Löwis <[EMAIL PROTECTED]> added the comment: I think the patch is fairly incomplete. "i" still stays at uint, so if numarenas would ever overflow uint, the loop would never reach numarenas, and all arenas would get discarded.
Likewise, maxarenas still stays at uint, so when numarenas overflows uint, the additional arenas get discarded. The compiler was right observing that the condition is always false: this was a security check to prevent overflow, but on this specific system, overflow couldn't occur in the first place. If you want to silence the warning, try casting numarenas to size_t in the test only. If you want to properly remove the unnecessary test, put an ifdef around it, testing whether size_t is larger than uint. With the current code, it might be that you have disabled the security check: numarenas <= maxarenas will not occur anymore (since numarenas is wider than maxarenas); as a consequence, you then see the silent truncation later on instead of the exception. ---------- nosy: +loewis _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3642> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com