summaryrefslogtreecommitdiff
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
parent16b92d1613e245919743be5f168abe77712ec84b (diff)
downloadnetsurf-63cc03a5dcfe2302eb73031a46d6e4a0bb56b759.tar.gz
netsurf-63cc03a5dcfe2302eb73031a46d6e4a0bb56b759.tar.bz2
Fix GCC 4.6 warnings in core
svn path=/trunk/netsurf/; revision=12629
-rw-r--r--desktop/tree.c3
-rw-r--r--image/mng.c3
-rw-r--r--render/form.c19
-rw-r--r--render/html_interaction.c5
4 files changed, 3 insertions, 27 deletions
diff --git a/desktop/tree.c b/desktop/tree.c
index f8105bb19..6c8071d90 100644
--- a/desktop/tree.c
+++ b/desktop/tree.c
@@ -476,11 +476,10 @@ static void tree_recalculate_node_sizes(struct tree *tree, struct node *node,
bool recalculate_sizes)
{
struct node_element *element;
- int width, height;
+ int height;
assert(node != NULL);
- width = node->box.width;
height = node->box.height;
node->box.width = 0;
node->box.height = 0;
diff --git a/image/mng.c b/image/mng.c
index 0ba084f6a..69c13fe97 100644
--- a/image/mng.c
+++ b/image/mng.c
@@ -444,7 +444,6 @@ bool nsmng_convert(struct content *c)
{
nsmng_content *mng = (nsmng_content *) c;
mng_retcode status;
- const char *data;
unsigned long size;
lwc_string *content_type;
bool match;
@@ -454,7 +453,7 @@ bool nsmng_convert(struct content *c)
assert(c != NULL);
- data = content__get_source_data(c, &size);
+ content__get_source_data(c, &size);
/* by this point, the png should have been parsed
* and the bitmap created, so ensure that's the case
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;