summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristos Zoulas <christos@zoulas.com>2017-01-22 18:25:07 +0100
committerWill Estes <westes575@gmail.com>2017-01-23 11:42:14 -0500
commitf01ab4fe024f3b5fc8921f72d23488cff44764d4 (patch)
treebeaaee8ca1e65826dc93fbc010ea581aa2093819 /src
parent7ca76038dfa985f3f9560be53d775343cd1cf725 (diff)
Cast argument to avoid arithmetic on void *.
Diffstat (limited to 'src')
-rw-r--r--src/buf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buf.c b/src/buf.c
index 6d01f3d..185083c 100644
--- a/src/buf.c
+++ b/src/buf.c
@@ -259,7 +259,7 @@ struct Buf *buf_append (struct Buf *buf, const void *ptr, int n_elem)
buf->nmax = n_alloc;
}
- memcpy (buf->elts + (size_t) buf->nelts * buf->elt_size, ptr,
+ memcpy ((char *) buf->elts + (size_t) buf->nelts * buf->elt_size, ptr,
(size_t) n_elem * buf->elt_size);
buf->nelts += n_elem;