[PATCH] Silence the implicit signed/unsigned conversion warning.
Nico Weber
thakis at chromium.org
Thu Jun 26 11:30:16 PDT 2014
Hm, I checked "Accept revision" on phab, looks like that doesn't make it
into the email. So here's an explicit "looks good to me" (the comments are
just suggestions)
On Thu, Jun 26, 2014 at 11:27 AM, Nico Weber <thakis at chromium.org> wrote:
> Thanks!
>
> ================
> Comment at: src/Unwind/Unwind-EHABI.cpp:110
> @@ -108,3 +109,3 @@
> // Clear off flag from last bit.
> - length &= ~1;
> - offset &= ~1;
> + length &= ~(uint32_t)0x1;
> + offset &= ~(uint32_t)0x1;
> ----------------
> No need for the 0x
>
> Also, since we know this is always 32bit code, you can just write ~1u
> (everywhere)
>
> ================
> Comment at: src/Unwind/Unwind-EHABI.cpp:213
> @@ -211,3 +212,3 @@
> uint32_t RegisterRange(uint8_t start, uint8_t count_minus_one) {
> - return (start << 16) | (count_minus_one + 1);
> + return ((uint32_t)start << 16) | ((uint32_t)count_minus_one + 1);
> }
> ----------------
> Huh, your compiler warns when widening a unsigned byte to an unsigned int?
> Interesting.
>
> http://reviews.llvm.org/D4315
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140626/1e8bcfdf/attachment.html>
More information about the cfe-commits
mailing list