summaryrefslogtreecommitdiff
path: root/tools/asn2wrs.py
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2012-07-17 13:12:50 +0000
committerPascal Quantin <pascal.quantin@gmail.com>2012-07-17 13:12:50 +0000
commitbabe6229874376888afd728250e389c855d761a4 (patch)
tree1963676cb222265edccef8b3928aabb53b459e17 /tools/asn2wrs.py
parenta8016f6a57056e5af2304d8216b97841f945bef7 (diff)
downloadwireshark-babe6229874376888afd728250e389c855d761a4.tar.gz
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
Diffstat (limited to 'tools/asn2wrs.py')
-rwxr-xr-xtools/asn2wrs.py4
1 files changed, 3 insertions, 1 deletions
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):