pathencode: eliminate signed integer warnings stable
authorDanek Duvall <danek.duvall@oracle.com>
Wed, 19 Feb 2014 13:11:24 -0800
branchstable
changeset 20535 5f683209f5b6
parent 20530 78f547cdc362
child 20537 c1febc167d87
child 20562 35ac807f941c
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.
mercurial/pathencode.c
--- a/mercurial/pathencode.c	Wed Feb 19 22:19:45 2014 +0900
+++ b/mercurial/pathencode.c	Wed Feb 19 13:11:24 2014 -0800
@@ -530,7 +530,7 @@
 	static const uint32_t twobytes[8];
 
 	static const uint32_t onebyte[8] = {
-		~0, 0xffff3ffe, ~0, ~0, ~0, ~0, ~0, ~0,
+		~0U, 0xffff3ffe, ~0U, ~0U, ~0U, ~0U, ~0U, ~0U,
 	};
 
 	return _encode(twobytes, onebyte, dest, 0, destsize, src, len, 0);