Fix GCC 4.6 warnings in core
svn path=/trunk/netsurf/; revision=12629
This commit is contained in:
parent
16b92d1613
commit
63cc03a5dc
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue