diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/base64.c | 2 | ||||
-rw-r--r-- | src/node.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/base64.c b/src/base64.c index 02ca828b..ce8fe74d 100644 --- a/src/base64.c +++ b/src/base64.c @@ -90,7 +90,7 @@ decode_chunk(const uint8_t in[4], uint8_t out[3]) out[0] = (uint8_t)(((unmap(in[0]) << 2)) | unmap(in[1]) >> 4); out[1] = (uint8_t)(((unmap(in[1]) << 4) & 0xF0) | unmap(in[2]) >> 2); out[2] = (uint8_t)(((unmap(in[2]) << 6) & 0xC0) | unmap(in[3])); - return 1 + (in[2] != '=') + ((in[2] != '=') && (in[3] != '=')); + return 1U + (in[2] != '=') + ((in[2] != '=') && (in[3] != '=')); } void* @@ -350,7 +350,7 @@ serd_node_new_decimal(const double d, const unsigned frac_digits) SerdNode serd_node_new_integer(const int64_t i) { - uint64_t abs_i = (i < 0) ? -i : i; + uint64_t abs_i = (uint64_t)((i < 0) ? -i : i); const unsigned digits = serd_digits((double)abs_i); char* buf = (char*)calloc(digits + 2, 1); SerdNode node = {(const uint8_t*)buf, 0, 0, 0, SERD_LITERAL}; |