Add casts to avoid some compiler warnings

if the compiler is not able to detect the cast if safe.
This commit is contained in:
Patrick Pelissier committed 2020-06-21 23:03:40 +02:00
1 parent bf49b8e933
commit 3f84f54d65
5 files changed
+76 -8

No files matched your search

+1 -1
View File
@@ -118,7 +118,7 @@ stringi_set_size(string_t s, size_t size)
// Function can be called when contract is not fullfilled
if (stringi_stack_p(s)) {
assert (size < sizeof (string_heap_t) - 1);
s->u.stack.buffer[sizeof (string_heap_t) - 1] = size;
s->u.stack.buffer[sizeof (string_heap_t) - 1] = (char) size;
} else
s->u.heap.size = size;
}