diff options
author | Craig Tiller <ctiller@google.com> | 2016-08-18 09:46:32 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-08-18 09:46:32 -0700 |
commit | c5c2c72d0fcbae0e3c05681ba3418f01a8511b54 (patch) | |
tree | 7c6663d83fa206a73df8340a45b969164b155660 /src/core | |
parent | 17ed6b17c7ebc4d70da020b6f785db22c835c722 (diff) |
Appease the casting gods
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/lib/support/percent_encoding.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/lib/support/percent_encoding.c b/src/core/lib/support/percent_encoding.c index 5da763c9a5..88953f2542 100644 --- a/src/core/lib/support/percent_encoding.c +++ b/src/core/lib/support/percent_encoding.c @@ -81,9 +81,9 @@ static bool valid_hex(const uint8_t *p, const uint8_t *end) { } static uint8_t dehex(uint8_t c) { - if (c >= '0' && c <= '9') return c - '0'; - if (c >= 'A' && c <= 'F') return c - 'A' + 10; - if (c >= 'a' && c <= 'f') return c - 'a' + 10; + if (c >= '0' && c <= '9') return (uint8_t)(c - '0'); + if (c >= 'A' && c <= 'F') return (uint8_t)(c - 'A' + 10); + if (c >= 'a' && c <= 'f') return (uint8_t)(c - 'a' + 10); GPR_UNREACHABLE_CODE(return 255); } |