Mercurial > hg
comparison mercurial/pathencode.c @ 20535:5f683209f5b6 stable
pathencode: eliminate signed integer warnings
Compiling mercurial with the Sun Studio compiler gives seven copies of the
following warning on pathencode.c:
line 533: warning: initializer will be sign-extended: -1
Using explicit unsigned literals silences it.
author | Danek Duvall <danek.duvall@oracle.com> |
---|---|
date | Wed, 19 Feb 2014 13:11:24 -0800 |
parents | 66da6e9feacd |
children | 822f46b80fa9 |
comparison
equal
deleted
inserted
replaced
20530:78f547cdc362 | 20535:5f683209f5b6 |
---|---|
528 const char *src, Py_ssize_t len) | 528 const char *src, Py_ssize_t len) |
529 { | 529 { |
530 static const uint32_t twobytes[8]; | 530 static const uint32_t twobytes[8]; |
531 | 531 |
532 static const uint32_t onebyte[8] = { | 532 static const uint32_t onebyte[8] = { |
533 ~0, 0xffff3ffe, ~0, ~0, ~0, ~0, ~0, ~0, | 533 ~0U, 0xffff3ffe, ~0U, ~0U, ~0U, ~0U, ~0U, ~0U, |
534 }; | 534 }; |
535 | 535 |
536 return _encode(twobytes, onebyte, dest, 0, destsize, src, len, 0); | 536 return _encode(twobytes, onebyte, dest, 0, destsize, src, len, 0); |
537 } | 537 } |
538 | 538 |