Commit 786a2640 authored by rushing's avatar rushing

avoid LLVM warning: skip ternary operator when value is unsigned (-Wtautological-compare).

parent bf9979f8
...@@ -6021,8 +6021,10 @@ class SequenceNode(ExprNode): ...@@ -6021,8 +6021,10 @@ class SequenceNode(ExprNode):
if isinstance(mult_factor.constant_result, (int,long)) \ if isinstance(mult_factor.constant_result, (int,long)) \
and mult_factor.constant_result > 0: and mult_factor.constant_result > 0:
size_factor = ' * %s' % mult_factor.constant_result size_factor = ' * %s' % mult_factor.constant_result
else: elif mult_factor.type.signed:
size_factor = ' * ((%s<0) ? 0:%s)' % (c_mult, c_mult) size_factor = ' * ((%s<0) ? 0:%s)' % (c_mult, c_mult)
else:
size_factor = ' * (%s)' % (c_mult,)
if self.type is Builtin.tuple_type and (self.is_literal or self.slow) and not c_mult: if self.type is Builtin.tuple_type and (self.is_literal or self.slow) and not c_mult:
# use PyTuple_Pack() to avoid generating huge amounts of one-time code # use PyTuple_Pack() to avoid generating huge amounts of one-time code
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment