forked from len0rd/rockbox
Fix 'unused-but-set-variable' warnings (doom, lua)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30008 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
142725ebc9
commit
7b605f0416
2 changed files with 7 additions and 13 deletions
|
|
@ -114,12 +114,11 @@ int printf(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
static int p_xtpt;
|
static int p_xtpt;
|
||||||
char p_buf[50];
|
char p_buf[50];
|
||||||
bool ok;
|
|
||||||
rb->yield();
|
rb->yield();
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
ok = vsnprintf(p_buf,sizeof(p_buf), fmt, ap);
|
vsnprintf(p_buf,sizeof(p_buf), fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
||||||
rb->lcd_putsxy(1,p_xtpt, (unsigned char *)p_buf);
|
rb->lcd_putsxy(1,p_xtpt, (unsigned char *)p_buf);
|
||||||
|
|
|
||||||
|
|
@ -2823,16 +2823,10 @@ static struct mallinfo internal_mallinfo(mstate m) {
|
||||||
|
|
||||||
static void internal_malloc_stats(mstate m) {
|
static void internal_malloc_stats(mstate m) {
|
||||||
if (!PREACTION(m)) {
|
if (!PREACTION(m)) {
|
||||||
size_t maxfp = 0;
|
|
||||||
size_t fp = 0;
|
|
||||||
size_t used = 0;
|
|
||||||
check_malloc_state(m);
|
check_malloc_state(m);
|
||||||
if (is_initialized(m)) {
|
if (is_initialized(m)) {
|
||||||
msegmentptr s = &m->seg;
|
msegmentptr s = &m->seg;
|
||||||
maxfp = m->max_footprint;
|
size_t used = m->footprint - (m->topsize + TOP_FOOT_SIZE);
|
||||||
fp = m->footprint;
|
|
||||||
used = fp - (m->topsize + TOP_FOOT_SIZE);
|
|
||||||
|
|
||||||
while (s != 0) {
|
while (s != 0) {
|
||||||
mchunkptr q = align_as_chunk(s->base);
|
mchunkptr q = align_as_chunk(s->base);
|
||||||
while (segment_holds(s, q) &&
|
while (segment_holds(s, q) &&
|
||||||
|
|
@ -2843,12 +2837,13 @@ static void internal_malloc_stats(mstate m) {
|
||||||
}
|
}
|
||||||
s = s->next;
|
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);
|
POSTACTION(m);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue