summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-06-03 18:42:02 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2013-06-03 18:42:02 +0100
commitfd453beb9702fd28f8724db969099b2f4463b62e (patch)
treede01c1d236d0d315522707db0c956da171bd473a
parent1726304d72f766777c3e8f6a15f789fdaec5803e (diff)
downloadnetsurf-fd453beb9702fd28f8724db969099b2f4463b62e.tar.gz
netsurf-fd453beb9702fd28f8724db969099b2f4463b62e.tar.bz2
Squash warnings for things that can't happen.
-rw-r--r--desktop/treeview.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/desktop/treeview.c b/desktop/treeview.c
index 02dd7e208..dfa4ea3a1 100644
--- a/desktop/treeview.c
+++ b/desktop/treeview.c
@@ -756,7 +756,7 @@ void treeview_redraw(struct treeview *tree, int x, int y, struct rect *clip,
int render_y = 0;
int x0, y0, y1;
int baseline = (tree_g.line_height * 3 + 2) / 4;
- enum treeview_resource_id res;
+ enum treeview_resource_id res = TREE_RES_CONTENT;
plot_style_t *bg;
plot_font_style_t *text;
int height;
@@ -823,6 +823,8 @@ void treeview_redraw(struct treeview *tree, int x, int y, struct rect *clip,
assert(node != NULL);
assert(node != root);
+ assert(node->type == TREE_NODE_FOLDER ||
+ node->type == TREE_NODE_ENTRY);
count++;
height = (node->type == TREE_NODE_ENTRY) ? node->height :
@@ -945,7 +947,8 @@ void treeview_redraw(struct treeview *tree, int x, int y, struct rect *clip,
if (render_y < clip->y1) {
/* Fill the blank area at the bottom */
y0 = render_y;
- new_ctx.plot->rectangle(r.x0, y0, r.x1, r.y1, bg);
+ new_ctx.plot->rectangle(r.x0, y0, r.x1, r.y1,
+ &plot_style_even.bg);
}