summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2011-07-26 21:30:38 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2011-07-26 21:30:38 +0000
commit63cc03a5dcfe2302eb73031a46d6e4a0bb56b759 (patch)
treef7437bbf34a172b1da7d7ec5fc567e36f1d5dee7 /render
parent16b92d1613e245919743be5f168abe77712ec84b (diff)
downloadnetsurf-63cc03a5dcfe2302eb73031a46d6e4a0bb56b759.tar.gz
netsurf-63cc03a5dcfe2302eb73031a46d6e4a0bb56b759.tar.bz2
Fix GCC 4.6 warnings in core
svn path=/trunk/netsurf/; revision=12629
Diffstat (limited to 'render')
-rw-r--r--render/form.c19
-rw-r--r--render/html_interaction.c5
2 files changed, 1 insertions, 23 deletions
diff --git a/render/form.c b/render/form.c
index dd150adde..b47d39a22 100644
--- a/render/form.c
+++ b/render/form.c
@@ -871,8 +871,7 @@ bool form_open_select_menu(void *client_data,
select_menu_redraw_callback callback,
struct content *c)
{
- int i, line_height_with_spacing, scroll;
- struct form_option *option;
+ int line_height_with_spacing;
struct box *box;
plot_font_style_t fstyle;
int total_height;
@@ -914,25 +913,9 @@ bool form_open_select_menu(void *client_data,
line_height_with_spacing;
menu->height = total_height;
- scroll = 0;
if (menu->height > MAX_SELECT_HEIGHT) {
menu->height = MAX_SELECT_HEIGHT;
-
- if (control->data.select.num_selected > 0) {
- i = 0;
- option = control->data.select.items;
- while (!option->selected) {
- option = option->next;
- i++;
- }
-
- if ((i + 1) * line_height_with_spacing >
- MAX_SELECT_HEIGHT)
- scroll = (i + 1) *
- line_height_with_spacing
- - MAX_SELECT_HEIGHT;
- }
}
menu->client_data = client_data;
menu->callback = callback;
diff --git a/render/html_interaction.c b/render/html_interaction.c
index 8f60877e2..98fb4c9cb 100644
--- a/render/html_interaction.c
+++ b/render/html_interaction.c
@@ -236,8 +236,6 @@ void html_mouse_action(struct content *c, struct browser_window *bw,
while ((next_box = box_at_point(box, x, y, &box_x, &box_y, &content)) !=
NULL) {
- enum css_overflow_e overflow = CSS_OVERFLOW_VISIBLE;
-
box = next_box;
if (box->style && css_computed_visibility(box->style) ==
@@ -280,9 +278,6 @@ void html_mouse_action(struct content *c, struct browser_window *bw,
pointer = get_pointer_shape(bw, box, false);
- if (box->style)
- overflow = css_computed_overflow(box->style);
-
if ((box->scroll_x != NULL || box->scroll_y != NULL) &&
drag_candidate == NULL)
drag_candidate = box;