aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-01-09 19:17:28 +0100
committerDavid Robillard <d@drobilla.net>2021-01-09 19:25:31 +0100
commitb3a07044be6f31e20587011309b7798243ed93e0 (patch)
tree0cee74fb1d8ca59f5425bd4492aee5877c21de42 /src
parent7ceba786800e8e4d728c13f07d8b9e2788eeab17 (diff)
downloadserd-b3a07044be6f31e20587011309b7798243ed93e0.tar.gz
serd-b3a07044be6f31e20587011309b7798243ed93e0.tar.bz2
serd-b3a07044be6f31e20587011309b7798243ed93e0.zip
Avoid GCC warning about potential signed overflow
Diffstat (limited to 'src')
-rw-r--r--src/node.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node.c b/src/node.c
index 033b86db..5bd08817 100644
--- a/src/node.c
+++ b/src/node.c
@@ -342,7 +342,7 @@ serd_node_new_decimal(double d, unsigned frac_digits)
SerdNode
serd_node_new_integer(int64_t i)
{
- int64_t abs_i = (i < 0) ? -i : i;
+ uint64_t abs_i = (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};