From d06c35c6603859a575993ee3dac5244c529e09f5 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 9 Aug 2012 02:29:04 +0000 Subject: Fix warnings: -Wshadow -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wmissing-prototypes. git-svn-id: http://svn.drobilla.net/zix/trunk@72 df6676b4-ccc9-40e5-b5d6-7c4628a128e3 --- src/ring.c | 2 +- src/strindex.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/ring.c b/src/ring.c index 7ebbe67..b701497 100644 --- a/src/ring.c +++ b/src/ring.c @@ -216,7 +216,7 @@ zix_ring_write(ZixRing* ring, const void* src, uint32_t size) } else { const uint32_t this_size = ring->size - w; memcpy(&ring->buf[w], src, this_size); - memcpy(&ring->buf[0], (char*)src + this_size, size - this_size); + memcpy(&ring->buf[0], (const char*)src + this_size, size - this_size); ZIX_WRITE_BARRIER(); ring->write_head = size - this_size; } diff --git a/src/strindex.c b/src/strindex.c index 886d261..bd97db5 100644 --- a/src/strindex.c +++ b/src/strindex.c @@ -190,8 +190,11 @@ ZIX_API ZixStatus zix_strindex_find(ZixStrindex* t, const char* p, char** match) { - ZixStrindexNode* n = t->root; - const char* orig_p = p; +#ifndef NDEBUG + const char* orig_p = p; +#endif + + ZixStrindexNode* n = t->root; size_t child_i; *match = NULL; -- cgit v1.2.1