[gtkhtml] Bug 641765 - Fix warnings from GCC 4.6
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkhtml] Bug 641765 - Fix warnings from GCC 4.6
- Date: Tue, 8 Feb 2011 05:08:10 +0000 (UTC)
commit 034968c7830e74fdbf28b1fe586c29c3f44f5bc6
Author: Kjartan Maraas <kmaraas gnome org>
Date: Tue Feb 8 00:07:21 2011 -0500
Bug 641765 - Fix warnings from GCC 4.6
GCC learned how to find dead assignments.
components/editor/gtkhtml-editor-signals.c | 12 +-----------
gtkhtml/gtkhtml.c | 9 +++------
2 files changed, 4 insertions(+), 17 deletions(-)
---
diff --git a/components/editor/gtkhtml-editor-signals.c b/components/editor/gtkhtml-editor-signals.c
index 4f04447..df0f8d6 100644
--- a/components/editor/gtkhtml-editor-signals.c
+++ b/components/editor/gtkhtml-editor-signals.c
@@ -1141,8 +1141,6 @@ gtkhtml_editor_link_properties_show_window_cb (GtkWidget *window))
gchar *url = NULL, *dsc = NULL;
gboolean sensitive;
HTMLCursor *cursor;
- gint start_offset = 0;
- gint end_offset = 0;
editor = extract_gtkhtml_editor (window);
html = gtkhtml_editor_get_html (editor);
@@ -1159,25 +1157,17 @@ gtkhtml_editor_link_properties_show_window_cb (GtkWidget *window))
cursor->object, cursor->offset);
if (url != NULL) {
- if (HTML_IS_IMAGE (cursor->object)) {
- start_offset = 0;
- end_offset = 1;
- } else {
+ if (!HTML_IS_IMAGE (cursor->object)) {
Link *link;
link = html_text_get_link_at_offset (
HTML_TEXT (cursor->object),
cursor->offset);
if (link != NULL) {
- start_offset = link->start_offset;
- end_offset = link->end_offset;
dsc = html_text_get_link_text (HTML_TEXT (cursor->object), cursor->offset);
editor->priv->link_custom_description = dsc && !g_str_equal (dsc, url);
}
}
- } else if (HTML_IS_TEXT (cursor->object)) {
- start_offset = cursor->offset;
- end_offset = start_offset;
}
sensitive = (url == NULL);
diff --git a/gtkhtml/gtkhtml.c b/gtkhtml/gtkhtml.c
index 07f1705..4ec4b46 100644
--- a/gtkhtml/gtkhtml.c
+++ b/gtkhtml/gtkhtml.c
@@ -1385,7 +1385,6 @@ static void
size_allocate (GtkWidget *widget, GtkAllocation *allocation)
{
GtkHTML *html;
- GtkLayout *layout;
gboolean changed_x = FALSE, changed_y = FALSE;
g_return_if_fail (widget != NULL);
@@ -1393,10 +1392,10 @@ size_allocate (GtkWidget *widget, GtkAllocation *allocation)
g_return_if_fail (allocation != NULL);
html = GTK_HTML (widget);
- layout = GTK_LAYOUT (widget);
- /* isolate childs from layout - we want to set them after calc size is performed
- and we know the children positions */
+ /* isolate children from layout - we want to set them after calc size is performed
+ and we know the position of the children */
+
gtk_layout_faux_size_allocate (widget, allocation);
if (html->engine->width != allocation->width
@@ -2883,7 +2882,6 @@ gtk_html_class_init (GtkHTMLClass *klass)
GObjectClass *object_class;
GtkHTMLClass *html_class;
GtkWidgetClass *widget_class;
- GtkLayoutClass *layout_class;
GtkContainerClass *container_class;
gchar *filename;
GConfClient *client;
@@ -2891,7 +2889,6 @@ gtk_html_class_init (GtkHTMLClass *klass)
html_class = (GtkHTMLClass *) klass;
object_class = (GObjectClass *) klass;
widget_class = (GtkWidgetClass *) klass;
- layout_class = (GtkLayoutClass *) klass;
container_class = (GtkContainerClass *) klass;
parent_class = g_type_class_peek_parent (klass);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]