diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2014-03-20 21:42:02 +0000 |
|---|---|---|
| committer | Johan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl> | 2014-03-20 21:42:02 +0000 |
| commit | c30546d5324cdb57b02de119492f402b546c22fa (patch) | |
| tree | bf7f6a237f659c860e3974b00f09b33bd98b79ae /src | |
| parent | change more warnings into errors. (diff) | |
| download | inkscape-c30546d5324cdb57b02de119492f402b546c22fa.tar.gz inkscape-c30546d5324cdb57b02de119492f402b546c22fa.zip | |
Fix compiler warnings. These appear to fix some genuine bugs too (comparing unsigned numbers with integers, note that the result of (gint - guint) is unsigned!
(bzr r13171)
Diffstat (limited to 'src')
| -rw-r--r-- | src/libgdl/gdl-dock-item-button-image.c | 4 | ||||
| -rw-r--r-- | src/libgdl/gdl-dock-item-grip.c | 5 | ||||
| -rw-r--r-- | src/libgdl/gdl-dock-object.c | 2 | ||||
| -rw-r--r-- | src/libgdl/gdl-dock-paned.c | 8 | ||||
| -rw-r--r-- | src/libgdl/gdl-dock.c | 11 | ||||
| -rw-r--r-- | src/libgdl/gdl-switcher.c | 5 |
6 files changed, 15 insertions, 20 deletions
diff --git a/src/libgdl/gdl-dock-item-button-image.c b/src/libgdl/gdl-dock-item-button-image.c index 31613a898..77cfe5d6c 100644 --- a/src/libgdl/gdl-dock-item-button-image.c +++ b/src/libgdl/gdl-dock-item-button-image.c @@ -135,8 +135,8 @@ static void gdl_dock_item_button_image_class_init ( GdlDockItemButtonImageClass *klass) { - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass); + //GObjectClass *gobject_class = G_OBJECT_CLASS (klass); + //GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); widget_class->expose_event = diff --git a/src/libgdl/gdl-dock-item-grip.c b/src/libgdl/gdl-dock-item-grip.c index 2c3ec061e..d23eb7f98 100644 --- a/src/libgdl/gdl-dock-item-grip.c +++ b/src/libgdl/gdl-dock-item-grip.c @@ -536,10 +536,9 @@ gdl_dock_item_grip_size_allocate (GtkWidget *widget, GtkAllocation *allocation) { GdlDockItemGrip *grip; - GtkRequisition close_requisition = { 0, }; - GtkRequisition iconify_requisition = { 0, }; + GtkRequisition close_requisition = { 0, 0 }; + GtkRequisition iconify_requisition = { 0, 0 }; GtkAllocation child_allocation; - GdkRectangle label_area; guint border_width; g_return_if_fail (GDL_IS_DOCK_ITEM_GRIP (widget)); diff --git a/src/libgdl/gdl-dock-object.c b/src/libgdl/gdl-dock-object.c index a362d277a..4092ecc9f 100644 --- a/src/libgdl/gdl-dock-object.c +++ b/src/libgdl/gdl-dock-object.c @@ -869,7 +869,7 @@ gdl_dock_param_get_type (void) static GType our_type = 0; if (our_type == 0) { - GTypeInfo tinfo = { 0, }; + GTypeInfo tinfo = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; our_type = g_type_register_static (G_TYPE_STRING, "GdlDockParam", &tinfo, 0); /* register known transform functions */ diff --git a/src/libgdl/gdl-dock-paned.c b/src/libgdl/gdl-dock-paned.c index 42212d489..5b4561ef3 100644 --- a/src/libgdl/gdl-dock-paned.c +++ b/src/libgdl/gdl-dock-paned.c @@ -436,20 +436,20 @@ gdl_dock_paned_dock_request (GdlDockObject *object, my_request.target = object; /* See if it's in the border_width band. */ - if (rel_x < bw) { + if (rel_x < (gint)bw) { my_request.position = GDL_DOCK_LEFT; my_request.rect.width *= SPLIT_RATIO; divider = other.width; - } else if (rel_x > alloc.width - bw) { + } else if (rel_x > alloc.width - (gint)bw) { my_request.position = GDL_DOCK_RIGHT; my_request.rect.x += my_request.rect.width * (1 - SPLIT_RATIO); my_request.rect.width *= SPLIT_RATIO; divider = MAX (0, my.width - other.width); - } else if (rel_y < bw) { + } else if (rel_y < (gint)bw) { my_request.position = GDL_DOCK_TOP; my_request.rect.height *= SPLIT_RATIO; divider = other.height; - } else if (rel_y > alloc.height - bw) { + } else if (rel_y > alloc.height - (gint)bw) { my_request.position = GDL_DOCK_BOTTOM; my_request.rect.y += my_request.rect.height * (1 - SPLIT_RATIO); my_request.rect.height *= SPLIT_RATIO; diff --git a/src/libgdl/gdl-dock.c b/src/libgdl/gdl-dock.c index 6225864f0..c87468e5c 100644 --- a/src/libgdl/gdl-dock.c +++ b/src/libgdl/gdl-dock.c @@ -311,8 +311,6 @@ gdl_dock_constructor (GType type, } if (dock->_priv->floating) { - GdlDockObject *controller; - /* create floating window for this dock */ dock->_priv->window = gtk_window_new (GTK_WINDOW_TOPLEVEL); g_object_set_data (G_OBJECT (dock->_priv->window), "dock", dock); @@ -832,17 +830,17 @@ gdl_dock_dock_request (GdlDockObject *object, my_request.target = dock->root; /* See if it's in the border_width band. */ - if (rel_x < bw) { + if (rel_x < (gint)bw) { my_request.position = GDL_DOCK_LEFT; my_request.rect.width *= SPLIT_RATIO; - } else if (rel_x > alloc.width - bw) { + } else if (rel_x > alloc.width - (gint)bw) { my_request.position = GDL_DOCK_RIGHT; my_request.rect.x += my_request.rect.width * (1 - SPLIT_RATIO); my_request.rect.width *= SPLIT_RATIO; - } else if (rel_y < bw) { + } else if (rel_y < (gint)bw) { my_request.position = GDL_DOCK_TOP; my_request.rect.height *= SPLIT_RATIO; - } else if (rel_y > alloc.height - bw) { + } else if (rel_y > alloc.height - (gint)bw) { my_request.position = GDL_DOCK_BOTTOM; my_request.rect.y += my_request.rect.height * (1 - SPLIT_RATIO); my_request.rect.height *= SPLIT_RATIO; @@ -1215,7 +1213,6 @@ gdl_dock_add_item (GdlDock *dock, /* Non-floating item. */ if (dock->root) { GdlDockPlacement local_placement; - GtkRequisition preferred_size; best_dock_item = gdl_dock_find_best_placement_item (GDL_DOCK_ITEM (dock->root), diff --git a/src/libgdl/gdl-switcher.c b/src/libgdl/gdl-switcher.c index 780438886..53a4b1989 100644 --- a/src/libgdl/gdl-switcher.c +++ b/src/libgdl/gdl-switcher.c @@ -255,12 +255,12 @@ button_toggled_callback (GtkToggleButton *toggle_button, static int layout_buttons (GdlSwitcher *switcher) { - GtkRequisition client_requisition = {0,}; + GtkRequisition client_requisition = {0,0}; GtkAllocation allocation; GdlSwitcherStyle switcher_style; gboolean icons_only; int num_btns = g_slist_length (switcher->priv->buttons); - int btns_per_row; + unsigned int btns_per_row; GSList **rows, *p; Button *button; int row_number; @@ -790,7 +790,6 @@ gdl_switcher_add_button (GdlSwitcher *switcher, const gchar *label, GdkPixbuf *pixbuf_icon, gint switcher_id, GtkWidget* page) { - GtkWidget *event_box; GtkWidget *button_widget; GtkWidget *hbox; GtkWidget *icon_widget; |
