From patchwork Wed Feb 19 21:16:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: pathencode: eliminate signed integer warnings From: Danek Duvall X-Patchwork-Id: 3703 Message-Id: <20140219211631.GV109@smelly.us.oracle.com> To: mercurial-devel@selenic.com Date: Wed, 19 Feb 2014 13:16:31 -0800 # HG changeset patch # User Danek Duvall # Date 1392844284 28800 # Wed Feb 19 13:11:24 2014 -0800 # Node ID ad3388693673ef87a4368cb00a14b4a858c37b72 # Parent 0e2877f8605dcaf4fdf2ab7e0046f1f6f80161dd 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. diff --git a/mercurial/pathencode.c b/mercurial/pathencode.c --- a/mercurial/pathencode.c +++ b/mercurial/pathencode.c @@ -530,7 +530,7 @@ static Py_ssize_t auxencode(char *dest, 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);