summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2011-06-17 00:14:58 +0000
committerRafaël Carré <rafael.carre@gmail.com>2011-06-17 00:14:58 +0000
commit7b605f04168400f3b1b2024600886045f0103c3a (patch)
tree9e8a2a3ba88df84c6318b2ff3488b2aacdf4264a
parent142725ebc9c94b1afe81c7a3d33b8175b93ef27c (diff)
downloadrockbox-7b605f04168400f3b1b2024600886045f0103c3a.tar.gz
rockbox-7b605f04168400f3b1b2024600886045f0103c3a.tar.bz2
rockbox-7b605f04168400f3b1b2024600886045f0103c3a.zip
Fix 'unused-but-set-variable' warnings (doom, lua)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30008 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/doom/rockdoom.c3
-rw-r--r--apps/plugins/lua/malloc.c17
2 files changed, 7 insertions, 13 deletions
diff --git a/apps/plugins/doom/rockdoom.c b/apps/plugins/doom/rockdoom.c
index 6ce0e6d38d..1c2777a8ad 100644
--- a/apps/plugins/doom/rockdoom.c
+++ b/apps/plugins/doom/rockdoom.c
@@ -114,12 +114,11 @@ int printf(const char *fmt, ...)
{
static int p_xtpt;
char p_buf[50];
- bool ok;
rb->yield();
va_list ap;
va_start(ap, fmt);
- ok = vsnprintf(p_buf,sizeof(p_buf), fmt, ap);
+ vsnprintf(p_buf,sizeof(p_buf), fmt, ap);
va_end(ap);
rb->lcd_putsxy(1,p_xtpt, (unsigned char *)p_buf);
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);
}
}