From 0a0d61e777c47d742be195dd9c661065be0eb7da Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Sun, 12 Jan 2014 01:50:21 +0100 Subject: Fix remote warnings and charcell reds, and remove minor left-over tuff. Change-Id: I10987ea9fcad94d502afd4ae4a80ab9022c75d2e --- apps/gui/line.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'apps/gui/line.c') diff --git a/apps/gui/line.c b/apps/gui/line.c index e2eb6f277b..fe017970e6 100644 --- a/apps/gui/line.c +++ b/apps/gui/line.c @@ -53,18 +53,15 @@ static void put_text(struct screen *display, int x, int y, struct line_desc *lin struct line_desc_scroll { struct line_desc desc; /* must be first! */ bool used; -}; - -#define NOINLINE __attribute__ ((noinline)) +} lines[MAX_LINES]; -struct line_desc_scroll *get_line_desc(void) NOINLINE; -struct line_desc_scroll *get_line_desc(void) +static struct line_desc_scroll *get_line_desc(void) { - static struct line_desc_scroll lines[MAX_LINES]; static unsigned line_index; struct line_desc_scroll *this; - do { + do + { this = &lines[line_index++]; if (line_index >= ARRAYLEN(lines)) line_index = 0; @@ -87,7 +84,6 @@ static void scroller(struct scrollinfo *s, struct screen *display) line->used = false; } else - if (s->line) { style_line(display, s->x, s->y - (line->desc.height/2 - display->getcharheight()/2), &line->desc); put_text(display, s->x, s->y, &line->desc, s->line, true, s->offset); -- cgit v1.2.3