From babe6229874376888afd728250e389c855d761a4 Mon Sep 17 00:00:00 2001 From: Pascal Quantin Date: Tue, 17 Jul 2012 13:12:50 +0000 Subject: Use G_MININT32 instead of -2^31 so as to get rid of 'this decimal constant is unsigned only in ISO C90' warning svn path=/trunk/; revision=43764 --- tools/asn2wrs.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tools/asn2wrs.py') diff --git a/tools/asn2wrs.py b/tools/asn2wrs.py index 18fe4d12bf..797dc1cb0e 100755 --- a/tools/asn2wrs.py +++ b/tools/asn2wrs.py @@ -3225,7 +3225,9 @@ class Type (Node): if str(minv).isdigit(): minv += 'U' elif (str(minv)[0] == "-") and str(minv)[1:].isdigit(): - if (long(minv) < -(2**31)): + if (long(minv) == -(2**31)): + minv = "G_MININT32" + elif (long(minv) < -(2**31)): minv = "G_GINT64_CONSTANT(%s)" % (str(minv)) if str(maxv).isdigit(): if (long(maxv) >= 2**32): -- cgit v1.2.3