[pypy-commit] pypy default: No-op change: fix C compiler warnings in certain cases.

arigo noreply at buildbot.pypy.org
Thu Apr 26 10:44:37 CEST 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r54758:936fbee7d501
Date: 2012-04-25 22:01 +0200
http://bitbucket.org/pypy/pypy/changeset/936fbee7d501/

Log:	No-op change: fix C compiler warnings in certain cases.

diff --git a/pypy/rpython/tool/rffi_platform.py b/pypy/rpython/tool/rffi_platform.py
--- a/pypy/rpython/tool/rffi_platform.py
+++ b/pypy/rpython/tool/rffi_platform.py
@@ -379,7 +379,7 @@
         self.name = name
 
     def prepare_code(self):
-        yield 'if ((%s) < 0) {' % (self.name,)
+        yield 'if ((%s) <= 0) {' % (self.name,)
         yield '    long long x = (long long)(%s);' % (self.name,)
         yield '    printf("value: %lld\\n", x);'
         yield '} else {'
@@ -401,7 +401,7 @@
     def prepare_code(self):
         yield '#ifdef %s' % self.macro
         yield 'dump("defined", 1);'
-        yield 'if ((%s) < 0) {' % (self.macro,)
+        yield 'if ((%s) <= 0) {' % (self.macro,)
         yield '    long long x = (long long)(%s);' % (self.macro,)
         yield '    printf("value: %lld\\n", x);'
         yield '} else {'


More information about the pypy-commit mailing list