From 7b605f04168400f3b1b2024600886045f0103c3a Mon Sep 17 00:00:00 2001 From: Rafaël Carré Date: Fri, 17 Jun 2011 00:14:58 +0000 Subject: Fix 'unused-but-set-variable' warnings (doom, lua) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30008 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/lua/malloc.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'apps/plugins/lua') diff --git a/apps/plugins/lua/malloc.c b/apps/plugins/lua/malloc.c index e96497e4bb..6af2998549 100644 --- a/apps/plugins/lua/malloc.c +++ b/apps/plugins/lua/malloc.c @@ -2823,16 +2823,10 @@ static struct mallinfo internal_mallinfo(mstate m) { static void internal_malloc_stats(mstate m) { if (!PREACTION(m)) { - size_t maxfp = 0; - size_t fp = 0; - size_t used = 0; check_malloc_state(m); if (is_initialized(m)) { msegmentptr s = &m->seg; - maxfp = m->max_footprint; - fp = m->footprint; - used = fp - (m->topsize + TOP_FOOT_SIZE); - + size_t used = m->footprint - (m->topsize + TOP_FOOT_SIZE); while (s != 0) { mchunkptr q = align_as_chunk(s->base); while (segment_holds(s, q) && @@ -2843,12 +2837,13 @@ static void internal_malloc_stats(mstate m) { } s = s->next; } + DEBUGF("max system bytes = %10zu\n", m->max_footprint); + DEBUGF("system bytes = %10zu\n", m->footprint); + DEBUGF("in use bytes = %10zu\n", used); + } else { + DEBUGF("malloc not initialized\n"); } - DEBUGF("max system bytes = %10lu\n", (unsigned long)(maxfp)); - DEBUGF("system bytes = %10lu\n", (unsigned long)(fp)); - DEBUGF("in use bytes = %10lu\n", (unsigned long)(used)); - POSTACTION(m); } } -- cgit v1.2.3